Fixed buffers to work in newer versions of java
This commit is contained in:
parent
39c6312f61
commit
7ebacd26a0
|
|
@ -8,4 +8,5 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
|||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import static org.lwjgl.opengl.GL11.glTexImage2D;
|
|||
import static org.lwjgl.opengl.GL11.glTexParameteri;
|
||||
import static org.lwjgl.opengl.GL30.glGenerateMipmap;
|
||||
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
|
|
@ -324,7 +325,7 @@ public class TextureAtlas2D
|
|||
|
||||
ByteBuffer texmap_buff = ByteBuffer.allocateDirect(texmap_b.length);
|
||||
texmap_buff.put(texmap_b);
|
||||
texmap_buff.position(0);
|
||||
((Buffer)texmap_buff).position(0);
|
||||
|
||||
texture = glGenTextures();
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import static org.lwjgl.opengl.GL12.GL_TEXTURE_3D;
|
|||
import static org.lwjgl.opengl.GL12.glTexImage3D;
|
||||
import static org.lwjgl.opengl.GL30.glGenerateMipmap;
|
||||
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
|
|
@ -361,7 +362,7 @@ public class TextureAtlas3D
|
|||
|
||||
ByteBuffer texmap_buff = ByteBuffer.allocateDirect(texmap_b.length);
|
||||
texmap_buff.put(texmap_b);
|
||||
texmap_buff.position(0);
|
||||
((Buffer)texmap_buff).position(0);
|
||||
|
||||
texture = glGenTextures();
|
||||
glBindTexture(GL_TEXTURE_3D, texture);
|
||||
|
|
|
|||
Loading…
Reference in New Issue