diff options
Diffstat (limited to 'src/demos/vertexArrayRange')
-rw-r--r-- | src/demos/vertexArrayRange/VertexArrayRange.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/demos/vertexArrayRange/VertexArrayRange.java b/src/demos/vertexArrayRange/VertexArrayRange.java index 5252f0e..fee4280 100644 --- a/src/demos/vertexArrayRange/VertexArrayRange.java +++ b/src/demos/vertexArrayRange/VertexArrayRange.java @@ -306,12 +306,12 @@ public class VertexArrayRange { gl.glEnable(GL.GL_LIGHT0); gl.glEnable(GL.GL_LIGHTING); gl.glEnable(GL.GL_NORMALIZE); - gl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT, new float[] {.1f, .1f, 0, 1}); - gl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_DIFFUSE, new float[] {.6f, .6f, .1f, 1}); - gl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_SPECULAR, new float[] { 1, 1, .75f, 1}); + gl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT, new float[] {.1f, .1f, 0, 1}, 0); + gl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_DIFFUSE, new float[] {.6f, .6f, .1f, 1}, 0); + gl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_SPECULAR, new float[] { 1, 1, .75f, 1}, 0); gl.glMaterialf(GL.GL_FRONT_AND_BACK, GL.GL_SHININESS, 128.f); - gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, new float[] { .5f, 0, .5f, 0}); + gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, new float[] { .5f, 0, .5f, 0}, 0); gl.glLightModeli(GL.GL_LIGHT_MODEL_LOCAL_VIEWER, 0); // NOTE: it looks like GLUT (or something else) sets up the @@ -358,7 +358,7 @@ public class VertexArrayRange { int[] fences = new int[1]; for (int i = 0; i < numBuffers; i++) { buffers[i] = new VarBuffer(); - gl.glGenFencesNV(1, fences); + gl.glGenFencesNV(1, fences, 0); buffers[i].fence = fences[0]; } } @@ -513,10 +513,10 @@ public class VertexArrayRange { if (toggleLightingModel) { if(getFlag('i')) { // infinite light - gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, new float[] { .5f, 0, .5f, 0 }); + gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, new float[] { .5f, 0, .5f, 0 }, 0); gl.glLightModeli(GL.GL_LIGHT_MODEL_LOCAL_VIEWER, 0); } else { - gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, new float[] { .5f, 0, -.5f,1 }); + gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, new float[] { .5f, 0, -.5f, 1 }, 0); gl.glLightModeli(GL.GL_LIGHT_MODEL_LOCAL_VIEWER, 1); } toggleLightingModel = false; @@ -537,7 +537,7 @@ public class VertexArrayRange { 0, 0, 1, 0, 0, 0, -1, 1 }; - gl.glLoadMatrixf(modelViewMatrix); + gl.glLoadMatrixf(modelViewMatrix, 0); // FIXME: add mouse interaction // camera.apply_inverse_transform(); @@ -618,7 +618,7 @@ public class VertexArrayRange { for (int i = 0; i < elements.length; i++) { ++numDrawElementsCalls; - gl.glDrawElements(primitive, elements[i].length, GL.GL_UNSIGNED_INT, elements[i]); + gl.glDrawElements(primitive, elements[i].length, GL.GL_UNSIGNED_INT, elements[i], 0); if(getFlag('f')) { gl.glFlush(); } |