mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-07 07:24:20 +00:00
Renamed CoreGL* to GL* and merged CoreGL*Constants
This commit is contained in:
parent
038108fb76
commit
6deb142378
41 changed files with 13243 additions and 312 deletions
|
|
@ -151,10 +151,10 @@ public final class VBOIndexTest {
|
|||
* All rendering is done in here
|
||||
*/
|
||||
private static void render() {
|
||||
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
|
||||
CoreGL11.glPushMatrix();
|
||||
CoreGL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f);
|
||||
CoreGL11.glRotatef(angle, 0, 0, 1.0f);
|
||||
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f);
|
||||
GL11.glRotatef(angle, 0, 0, 1.0f);
|
||||
|
||||
|
||||
ByteBuffer new_mapped_buffer = ARBVertexBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, ARBVertexBufferObject.GL_WRITE_ONLY_ARB, 2*4*4, mapped_buffer);
|
||||
|
|
@ -175,9 +175,9 @@ public final class VBOIndexTest {
|
|||
mapped_indices_int_buffer.put(indices);
|
||||
if (ARBVertexBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB) &&
|
||||
ARBVertexBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB)) {
|
||||
CoreGL11.glDrawElements(CoreGL11.GL_QUADS, 4, CoreGL11.GL_UNSIGNED_INT, 0);
|
||||
GL11.glDrawElements(GL11.GL_QUADS, 4, GL11.GL_UNSIGNED_INT, 0);
|
||||
}
|
||||
CoreGL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -191,12 +191,12 @@ public final class VBOIndexTest {
|
|||
Sys.setProcessPriority(Sys.HIGH_PRIORITY);
|
||||
System.out.println("Timer resolution: " + Sys.getTimerResolution());
|
||||
// Go into orthographic projection mode.
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
|
||||
CoreGL11.glLoadIdentity();
|
||||
GL11.glMatrixMode(GL11.GL_PROJECTION);
|
||||
GL11.glLoadIdentity();
|
||||
GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight());
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
|
||||
CoreGL11.glLoadIdentity();
|
||||
CoreGL11.glViewport(0, 0, Display.getWidth(), Display.getHeight());
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight());
|
||||
if (!GLCaps.GL_ARB_vertex_buffer_object) {
|
||||
System.out.println("ARB VBO not supported!");
|
||||
System.exit(1);
|
||||
|
|
@ -215,8 +215,8 @@ public final class VBOIndexTest {
|
|||
indices.rewind();
|
||||
ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, 2*4*4, (ByteBuffer)null, ARBVertexBufferObject.GL_STREAM_DRAW_ARB);
|
||||
ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, 4*4, (ByteBuffer)null, ARBVertexBufferObject.GL_STREAM_DRAW_ARB);
|
||||
CoreGL11.glEnableClientState(CoreGL11.GL_VERTEX_ARRAY);
|
||||
CoreGL11.glVertexPointer(2, CoreGL11.GL_FLOAT, 0, 0);
|
||||
GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL11.glVertexPointer(2, GL11.GL_FLOAT, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue