mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-10 17:04:01 +00:00
Implemented safe VBO indices (phew)
This commit is contained in:
parent
e6cca3fda8
commit
35a1538f82
24 changed files with 821 additions and 100 deletions
|
|
@ -191,9 +191,8 @@ public final class VBOTest {
|
|||
vertices = ByteBuffer.allocateDirect(2*4*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
|
||||
vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50);
|
||||
GL.glBufferDataARB(GL.GL_ARRAY_BUFFER_ARB, 2*4*4, (ByteBuffer)null, GL.GL_STREAM_DRAW_ARB);
|
||||
ByteBuffer index_buffer = Sys.createIndexBuffer(0);
|
||||
GL.glEnableClientState(GL.GL_VERTEX_ARRAY);
|
||||
GL.glVertexPointer(2, 0, index_buffer.asFloatBuffer());
|
||||
GL.glVertexPointer(2, GL.GL_FLOAT, 0, 0);
|
||||
GL.glGetInteger(GL.GL_MAX_TEXTURE_UNITS_ARB, int_buffer);
|
||||
System.out.println("Number of texture units: " + int_buffer.get(0));
|
||||
// Fix the refresh rate to the display frequency.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue