From: <eli...@us...> - 2006-11-19 13:33:49
|
Revision: 2662 http://svn.sourceforge.net/java-game-lib/?rev=2662&view=rev Author: elias_naur Date: 2006-11-19 05:33:45 -0800 (Sun, 19 Nov 2006) Log Message: ----------- Made all GL functions only query ContextCapabilities.getCapabilities() once. Now all GLCheck checks will take the ContextCapabilities instance as an argument instead of querying for it. Inspired by MatthiasM, who just don't seem to be content with LWJGL performance, ever ;) Modified Paths: -------------- trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBBufferObject.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBColorBufferFloat.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBDrawBuffers.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBImaging.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBMatrixPalette.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBMultisample.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBMultitexture.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBOcclusionQuery.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBPointParameters.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBProgram.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBShaderObjects.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBTextureCompression.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBTransposeMatrix.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBVertexBlend.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBVertexProgram.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBVertexShader.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBWindowPos.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ATIDrawBuffers.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ATIElementArray.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ATIEnvmapBumpmap.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ATIFragmentShader.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ATIMapObjectBuffer.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ATIPnTriangles.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ATISeparateStencil.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ATITextFragmentShader.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ATIVertexArrayObject.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ATIVertexAttribArrayObject.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ATIVertexStreams.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTBindableUniform.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTBlendColor.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTBlendEquationSeparate.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTBlendFuncSeparate.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTBlendMinmax.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTCompiledVertexArray.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTDepthBoundsTest.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTDrawBuffers2.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTDrawInstanced.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTDrawRangeElements.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTFogCoord.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTFramebufferBlit.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTFramebufferMultisample.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTFramebufferObject.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTFramebufferSRGB.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTGeometryShader4.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTGpuProgramParameters.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTGpuShader4.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTMultiDrawArrays.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTPackedFloat.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTPalettedTexture.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTPointParameters.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTSecondaryColor.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTStencilClearTag.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTStencilTwoSide.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTextureArray.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTextureBufferObject.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTextureCompressionLATC.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTextureCompressionRGTC.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTextureInteger.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTextureSharedExponent.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTimerQuery.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTVertexShader.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTVertexWeighting.java trunk/LWJGL/src/generated/org/lwjgl/opengl/GL11.java trunk/LWJGL/src/generated/org/lwjgl/opengl/GL12.java trunk/LWJGL/src/generated/org/lwjgl/opengl/GL13.java trunk/LWJGL/src/generated/org/lwjgl/opengl/GL14.java trunk/LWJGL/src/generated/org/lwjgl/opengl/GL15.java trunk/LWJGL/src/generated/org/lwjgl/opengl/GL20.java trunk/LWJGL/src/generated/org/lwjgl/opengl/GL21.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVDepthBufferFloat.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVEvaluators.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVFence.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVFragmentProgram.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVFramebufferMultisampleCoverage.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVGeometryProgram4.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVGpuProgram4.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVHalfFloat.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVOcclusionQuery.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVParameterBufferObject.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVPixelDataRange.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVPointSprite.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVPrimitiveRestart.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVProgram.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVRegisterCombiners.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVRegisterCombiners2.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVTransformFeeback.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVVertexArrayRange.java trunk/LWJGL/src/generated/org/lwjgl/opengl/NVVertexProgram.java trunk/LWJGL/src/generated/org/lwjgl/opengl/SGISGenerateMipmap.java trunk/LWJGL/src/generated/org/lwjgl/opengl/SGISTextureLOD.java trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTBindableUniform.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTBlendColor.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTBlendMinmax.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTDrawBuffers2.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTDrawInstanced.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTGeometryShader4.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTGpuProgramParameters.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTGpuShader4.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTTextureArray.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTTextureBufferObject.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTTextureInteger.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTTimerQuery.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_GL21.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_NVDepthBufferFloat.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_NVFramebufferMultisampleCoverage.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_NVGeometryProgram4.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_NVGpuProgram4.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_NVParameterBufferObject.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_NVTransformFeeback.c trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java Modified: trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBBufferObject.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBBufferObject.java 2006-11-19 12:48:57 UTC (rev 2661) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBBufferObject.java 2006-11-19 13:33:45 UTC (rev 2662) @@ -36,14 +36,16 @@ public static void glBindBufferARB(int target, int buffer) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBindBufferARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glBindBufferARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglBindBufferARB(target, buffer, function_pointer); } private static native void nglBindBufferARB(int target, int buffer, long function_pointer); public static void glDeleteBuffersARB(IntBuffer buffers) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glDeleteBuffersARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glDeleteBuffersARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(buffers); nglDeleteBuffersARB((buffers.remaining()), buffers, buffers.position(), function_pointer); @@ -51,7 +53,8 @@ private static native void nglDeleteBuffersARB(int n, IntBuffer buffers, int buffers_position, long function_pointer); public static void glGenBuffersARB(IntBuffer buffers) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glGenBuffersARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glGenBuffersARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(buffers); nglGenBuffersARB((buffers.remaining()), buffers, buffers.position(), function_pointer); @@ -59,7 +62,8 @@ private static native void nglGenBuffersARB(int n, IntBuffer buffers, int buffers_position, long function_pointer); public static boolean glIsBufferARB(int buffer) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glIsBufferARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glIsBufferARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); boolean __result = nglIsBufferARB(buffer, function_pointer); return __result; @@ -67,36 +71,42 @@ private static native boolean nglIsBufferARB(int buffer, long function_pointer); public static void glBufferDataARB(int target, long size, int usage) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBufferDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glBufferDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglBufferDataARB(target, size, null, 0, usage, function_pointer); } public static void glBufferDataARB(int target, ByteBuffer data, int usage) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBufferDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glBufferDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglBufferDataARB(target, (data.remaining()), data, data.position(), usage, function_pointer); } public static void glBufferDataARB(int target, DoubleBuffer data, int usage) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBufferDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glBufferDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglBufferDataARB(target, (data.remaining() << 3), data, data.position() << 3, usage, function_pointer); } public static void glBufferDataARB(int target, FloatBuffer data, int usage) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBufferDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glBufferDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglBufferDataARB(target, (data.remaining() << 2), data, data.position() << 2, usage, function_pointer); } public static void glBufferDataARB(int target, IntBuffer data, int usage) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBufferDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glBufferDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglBufferDataARB(target, (data.remaining() << 2), data, data.position() << 2, usage, function_pointer); } public static void glBufferDataARB(int target, ShortBuffer data, int usage) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBufferDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glBufferDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglBufferDataARB(target, (data.remaining() << 1), data, data.position() << 1, usage, function_pointer); @@ -104,31 +114,36 @@ private static native void nglBufferDataARB(int target, long size, Buffer data, int data_position, int usage, long function_pointer); public static void glBufferSubDataARB(int target, long offset, ByteBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBufferSubDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glBufferSubDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglBufferSubDataARB(target, offset, (data.remaining()), data, data.position(), function_pointer); } public static void glBufferSubDataARB(int target, long offset, DoubleBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBufferSubDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glBufferSubDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglBufferSubDataARB(target, offset, (data.remaining() << 3), data, data.position() << 3, function_pointer); } public static void glBufferSubDataARB(int target, long offset, FloatBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBufferSubDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glBufferSubDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2, function_pointer); } public static void glBufferSubDataARB(int target, long offset, IntBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBufferSubDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glBufferSubDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2, function_pointer); } public static void glBufferSubDataARB(int target, long offset, ShortBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBufferSubDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glBufferSubDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglBufferSubDataARB(target, offset, (data.remaining() << 1), data, data.position() << 1, function_pointer); @@ -136,31 +151,36 @@ private static native void nglBufferSubDataARB(int target, long offset, long size, Buffer data, int data_position, long function_pointer); public static void glGetBufferSubDataARB(int target, long offset, ByteBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glGetBufferSubDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glGetBufferSubDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglGetBufferSubDataARB(target, offset, (data.remaining()), data, data.position(), function_pointer); } public static void glGetBufferSubDataARB(int target, long offset, DoubleBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glGetBufferSubDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glGetBufferSubDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglGetBufferSubDataARB(target, offset, (data.remaining() << 3), data, data.position() << 3, function_pointer); } public static void glGetBufferSubDataARB(int target, long offset, FloatBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glGetBufferSubDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glGetBufferSubDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglGetBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2, function_pointer); } public static void glGetBufferSubDataARB(int target, long offset, IntBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glGetBufferSubDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glGetBufferSubDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglGetBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2, function_pointer); } public static void glGetBufferSubDataARB(int target, long offset, ShortBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glGetBufferSubDataARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glGetBufferSubDataARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglGetBufferSubDataARB(target, offset, (data.remaining() << 1), data, data.position() << 1, function_pointer); @@ -179,7 +199,8 @@ * @return A ByteBuffer representing the mapped buffer memory. */ public static java.nio.ByteBuffer glMapBufferARB(int target, int access, int result_size, java.nio.ByteBuffer old_buffer) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glMapBufferARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glMapBufferARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); if (old_buffer != null) BufferChecks.checkDirect(old_buffer); @@ -189,7 +210,8 @@ private static native java.nio.ByteBuffer nglMapBufferARB(int target, int access, int result_size, java.nio.ByteBuffer old_buffer, long function_pointer); public static boolean glUnmapBufferARB(int target) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glUnmapBufferARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glUnmapBufferARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); boolean __result = nglUnmapBufferARB(target, function_pointer); return __result; @@ -197,7 +219,8 @@ private static native boolean nglUnmapBufferARB(int target, long function_pointer); public static void glGetBufferParameterARB(int target, int pname, IntBuffer params) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glGetBufferParameterivARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glGetBufferParameterivARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkBuffer(params, 4); nglGetBufferParameterivARB(target, pname, params, params.position(), function_pointer); @@ -205,7 +228,8 @@ private static native void nglGetBufferParameterivARB(int target, int pname, IntBuffer params, int params_position, long function_pointer); public static java.nio.ByteBuffer glGetBufferPointerARB(int target, int pname, int result_size) { - long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glGetBufferPointervARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_buffer_object_glGetBufferPointervARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); java.nio.ByteBuffer __result = nglGetBufferPointervARB(target, pname, result_size, function_pointer); return __result; Modified: trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBColorBufferFloat.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBColorBufferFloat.java 2006-11-19 12:48:57 UTC (rev 2661) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBColorBufferFloat.java 2006-11-19 13:33:45 UTC (rev 2662) @@ -32,7 +32,8 @@ * Accepted as a bit set in the GLX_RENDER_TYPE variable */ public static void glClampColorARB(int target, int clamp) { - long function_pointer = GLContext.getCapabilities().ARB_color_buffer_float_glClampColorARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_color_buffer_float_glClampColorARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglClampColorARB(target, clamp, function_pointer); } Modified: trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBDrawBuffers.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBDrawBuffers.java 2006-11-19 12:48:57 UTC (rev 2661) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBDrawBuffers.java 2006-11-19 13:33:45 UTC (rev 2662) @@ -34,7 +34,8 @@ public static void glDrawBuffersARB(IntBuffer buffers) { - long function_pointer = GLContext.getCapabilities().ARB_draw_buffers_glDrawBuffersARB_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_draw_buffers_glDrawBuffersARB_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(buffers); nglDrawBuffersARB((buffers.remaining()), buffers, buffers.position(), function_pointer); Modified: trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBImaging.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBImaging.java 2006-11-19 12:48:57 UTC (rev 2661) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/ARBImaging.java 2006-11-19 13:33:45 UTC (rev 2662) @@ -88,67 +88,76 @@ public static void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorTable_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glColorTable_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOdisabled(); + GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkBuffer(data, 256); nglColorTable(target, internalFormat, width, format, type, data, data.position(), function_pointer); } public static void glColorTable(int target, int internalFormat, int width, int format, int type, DoubleBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorTable_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glColorTable_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOdisabled(); + GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkBuffer(data, 256); nglColorTable(target, internalFormat, width, format, type, data, data.position() << 3, function_pointer); } public static void glColorTable(int target, int internalFormat, int width, int format, int type, FloatBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorTable_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glColorTable_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOdisabled(); + GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkBuffer(data, 256); nglColorTable(target, internalFormat, width, format, type, data, data.position() << 2, function_pointer); } private static native void nglColorTable(int target, int internalFormat, int width, int format, int type, Buffer data, int data_position, long function_pointer); public static void glColorTable(int target, int internalFormat, int width, int format, int type, long data_buffer_offset) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorTable_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glColorTable_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOenabled(); + GLChecks.ensureUnpackPBOenabled(caps); nglColorTableBO(target, internalFormat, width, format, type, data_buffer_offset, function_pointer); } private static native void nglColorTableBO(int target, int internalFormat, int width, int format, int type, long data_buffer_offset, long function_pointer); public static void glColorSubTable(int target, int start, int count, int format, int type, ByteBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorSubTable_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glColorSubTable_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOdisabled(); + GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkBuffer(data, 256); nglColorSubTable(target, start, count, format, type, data, data.position(), function_pointer); } public static void glColorSubTable(int target, int start, int count, int format, int type, DoubleBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorSubTable_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glColorSubTable_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOdisabled(); + GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkBuffer(data, 256); nglColorSubTable(target, start, count, format, type, data, data.position() << 3, function_pointer); } public static void glColorSubTable(int target, int start, int count, int format, int type, FloatBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorSubTable_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glColorSubTable_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOdisabled(); + GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkBuffer(data, 256); nglColorSubTable(target, start, count, format, type, data, data.position() << 2, function_pointer); } private static native void nglColorSubTable(int target, int start, int count, int format, int type, Buffer data, int data_position, long function_pointer); public static void glColorSubTable(int target, int start, int count, int format, int type, long data_buffer_offset) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorSubTable_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glColorSubTable_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOenabled(); + GLChecks.ensureUnpackPBOenabled(caps); nglColorSubTableBO(target, start, count, format, type, data_buffer_offset, function_pointer); } private static native void nglColorSubTableBO(int target, int start, int count, int format, int type, long data_buffer_offset, long function_pointer); public static void glColorTableParameter(int target, int pname, IntBuffer params) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorTableParameteriv_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glColorTableParameteriv_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkBuffer(params, 4); nglColorTableParameteriv(target, pname, params, params.position(), function_pointer); @@ -156,7 +165,8 @@ private static native void nglColorTableParameteriv(int target, int pname, IntBuffer params, int params_position, long function_pointer); public static void glColorTableParameter(int target, int pname, FloatBuffer params) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorTableParameterfv_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glColorTableParameterfv_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkBuffer(params, 4); nglColorTableParameterfv(target, pname, params, params.position(), function_pointer); @@ -164,33 +174,38 @@ private static native void nglColorTableParameterfv(int target, int pname, FloatBuffer params, int params_position, long function_pointer); public static void glCopyColorSubTable(int target, int start, int x, int y, int width) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glCopyColorSubTable_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glCopyColorSubTable_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglCopyColorSubTable(target, start, x, y, width, function_pointer); } private static native void nglCopyColorSubTable(int target, int start, int x, int y, int width, long function_pointer); public static void glCopyColorTable(int target, int internalformat, int x, int y, int width) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glCopyColorTable_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glCopyColorTable_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglCopyColorTable(target, internalformat, x, y, width, function_pointer); } private static native void nglCopyColorTable(int target, int internalformat, int x, int y, int width, long function_pointer); public static void glGetColorTable(int target, int format, int type, ByteBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetColorTable_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetColorTable_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkBuffer(data, 256); nglGetColorTable(target, format, type, data, data.position(), function_pointer); } public static void glGetColorTable(int target, int format, int type, DoubleBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetColorTable_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetColorTable_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkBuffer(data, 256); nglGetColorTable(target, format, type, data, data.position() << 3, function_pointer); } public static void glGetColorTable(int target, int format, int type, FloatBuffer data) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetColorTable_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetColorTable_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkBuffer(data, 256); nglGetColorTable(target, format, type, data, data.position() << 2, function_pointer); @@ -198,7 +213,8 @@ private static native void nglGetColorTable(int target, int format, int type, Buffer data, int data_position, long function_pointer); public static void glGetColorTableParameter(int target, int pname, IntBuffer params) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetColorTableParameteriv_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetColorTableParameteriv_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkBuffer(params, 4); nglGetColorTableParameteriv(target, pname, params, params.position(), function_pointer); @@ -206,7 +222,8 @@ private static native void nglGetColorTableParameteriv(int target, int pname, IntBuffer params, int params_position, long function_pointer); public static void glGetColorTableParameter(int target, int pname, FloatBuffer params) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetColorTableParameterfv_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetColorTableParameterfv_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkBuffer(params, 4); nglGetColorTableParameterfv(target, pname, params, params.position(), function_pointer); @@ -214,79 +231,90 @@ private static native void nglGetColorTableParameterfv(int target, int pname, FloatBuffer params, int params_position, long function_pointer); public static void glBlendEquation(int mode) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glBlendEquation_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glBlendEquation_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglBlendEquation(mode, function_pointer); } private static native void nglBlendEquation(int mode, long function_pointer); public static void glBlendColor(float red, float green, float blue, float alpha) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glBlendColor_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glBlendColor_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglBlendColor(red, green, blue, alpha, function_pointer); } private static native void nglBlendColor(float red, float green, float blue, float alpha, long function_pointer); public static void glHistogram(int target, int width, int internalformat, boolean sink) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glHistogram_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glHistogram_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglHistogram(target, width, internalformat, sink, function_pointer); } private static native void nglHistogram(int target, int width, int internalformat, boolean sink, long function_pointer); public static void glResetHistogram(int target) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glResetHistogram_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glResetHistogram_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglResetHistogram(target, function_pointer); } private static native void nglResetHistogram(int target, long function_pointer); public static void glGetHistogram(int target, boolean reset, int format, int type, ByteBuffer values) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogram_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetHistogram_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensurePackPBOdisabled(); + GLChecks.ensurePackPBOdisabled(caps); BufferChecks.checkBuffer(values, 256); nglGetHistogram(target, reset, format, type, values, values.position(), function_pointer); } public static void glGetHistogram(int target, boolean reset, int format, int type, DoubleBuffer values) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogram_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetHistogram_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensurePackPBOdisabled(); + GLChecks.ensurePackPBOdisabled(caps); BufferChecks.checkBuffer(values, 256); nglGetHistogram(target, reset, format, type, values, values.position() << 3, function_pointer); } public static void glGetHistogram(int target, boolean reset, int format, int type, FloatBuffer values) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogram_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetHistogram_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensurePackPBOdisabled(); + GLChecks.ensurePackPBOdisabled(caps); BufferChecks.checkBuffer(values, 256); nglGetHistogram(target, reset, format, type, values, values.position() << 2, function_pointer); } public static void glGetHistogram(int target, boolean reset, int format, int type, IntBuffer values) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogram_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetHistogram_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensurePackPBOdisabled(); + GLChecks.ensurePackPBOdisabled(caps); BufferChecks.checkBuffer(values, 256); nglGetHistogram(target, reset, format, type, values, values.position() << 2, function_pointer); } public static void glGetHistogram(int target, boolean reset, int format, int type, ShortBuffer values) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogram_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetHistogram_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensurePackPBOdisabled(); + GLChecks.ensurePackPBOdisabled(caps); BufferChecks.checkBuffer(values, 256); nglGetHistogram(target, reset, format, type, values, values.position() << 1, function_pointer); } private static native void nglGetHistogram(int target, boolean reset, int format, int type, Buffer values, int values_position, long function_pointer); public static void glGetHistogram(int target, boolean reset, int format, int type, long values_buffer_offset) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogram_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetHistogram_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensurePackPBOenabled(); + GLChecks.ensurePackPBOenabled(caps); nglGetHistogramBO(target, reset, format, type, values_buffer_offset, function_pointer); } private static native void nglGetHistogramBO(int target, boolean reset, int format, int type, long values_buffer_offset, long function_pointer); public static void glGetHistogramParameter(int target, int pname, FloatBuffer params) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogramParameterfv_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetHistogramParameterfv_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkBuffer(params, 256); nglGetHistogramParameterfv(target, pname, params, params.position(), function_pointer); @@ -294,7 +322,8 @@ private static native void nglGetHistogramParameterfv(int target, int pname, FloatBuffer params, int params_position, long function_pointer); public static void glGetHistogramParameter(int target, int pname, IntBuffer params) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogramParameteriv_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetHistogramParameteriv_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkBuffer(params, 256); nglGetHistogramParameteriv(target, pname, params, params.position(), function_pointer); @@ -302,65 +331,74 @@ private static native void nglGetHistogramParameteriv(int target, int pname, IntBuffer params, int params_position, long function_pointer); public static void glMinmax(int target, int internalformat, boolean sink) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glMinmax_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glMinmax_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglMinmax(target, internalformat, sink, function_pointer); } private static native void nglMinmax(int target, int internalformat, boolean sink, long function_pointer); public static void glResetMinmax(int target) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glResetMinmax_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glResetMinmax_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglResetMinmax(target, function_pointer); } private static native void nglResetMinmax(int target, long function_pointer); public static void glGetMinmax(int target, boolean reset, int format, int types, ByteBuffer values) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmax_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetMinmax_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensurePackPBOdisabled(); + GLChecks.ensurePackPBOdisabled(caps); BufferChecks.checkBuffer(values, 4); nglGetMinmax(target, reset, format, types, values, values.position(), function_pointer); } public static void glGetMinmax(int target, boolean reset, int format, int types, DoubleBuffer values) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmax_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetMinmax_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensurePackPBOdisabled(); + GLChecks.ensurePackPBOdisabled(caps); BufferChecks.checkBuffer(values, 4); nglGetMinmax(target, reset, format, types, values, values.position() << 3, function_pointer); } public static void glGetMinmax(int target, boolean reset, int format, int types, FloatBuffer values) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmax_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetMinmax_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensurePackPBOdisabled(); + GLChecks.ensurePackPBOdisabled(caps); BufferChecks.checkBuffer(values, 4); nglGetMinmax(target, reset, format, types, values, values.position() << 2, function_pointer); } public static void glGetMinmax(int target, boolean reset, int format, int types, IntBuffer values) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmax_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetMinmax_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensurePackPBOdisabled(); + GLChecks.ensurePackPBOdisabled(caps); BufferChecks.checkBuffer(values, 4); nglGetMinmax(target, reset, format, types, values, values.position() << 2, function_pointer); } public static void glGetMinmax(int target, boolean reset, int format, int types, ShortBuffer values) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmax_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetMinmax_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensurePackPBOdisabled(); + GLChecks.ensurePackPBOdisabled(caps); BufferChecks.checkBuffer(values, 4); nglGetMinmax(target, reset, format, types, values, values.position() << 1, function_pointer); } private static native void nglGetMinmax(int target, boolean reset, int format, int types, Buffer values, int values_position, long function_pointer); public static void glGetMinmax(int target, boolean reset, int format, int types, long values_buffer_offset) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmax_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetMinmax_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensurePackPBOenabled(); + GLChecks.ensurePackPBOenabled(caps); nglGetMinmaxBO(target, reset, format, types, values_buffer_offset, function_pointer); } private static native void nglGetMinmaxBO(int target, boolean reset, int format, int types, long values_buffer_offset, long function_pointer); public static void glGetMinmaxParameter(int target, int pname, FloatBuffer params) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmaxParameterfv_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetMinmaxParameterfv_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkBuffer(params, 4); nglGetMinmaxParameterfv(target, pname, params, params.position(), function_pointer); @@ -368,7 +406,8 @@ private static native void nglGetMinmaxParameterfv(int target, int pname, FloatBuffer params, int params_position, long function_pointer); public static void glGetMinmaxParameter(int target, int pname, IntBuffer params) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmaxParameteriv_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetMinmaxParameteriv_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkBuffer(params, 4); nglGetMinmaxParameteriv(target, pname, params, params.position(), function_pointer); @@ -376,88 +415,100 @@ private static native void nglGetMinmaxParameteriv(int target, int pname, IntBuffer params, int params_position, long function_pointer); public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ByteBuffer image) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter1D_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glConvolutionFilter1D_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOdisabled(); + GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, 1, 1)); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position(), function_pointer); } public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, DoubleBuffer image) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter1D_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glConvolutionFilter1D_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOdisabled(); + GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, 1, 1)); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position() << 3, function_pointer); } public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, FloatBuffer image) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter1D_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glConvolutionFilter1D_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOdisabled(); + GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, 1, 1)); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position() << 2, function_pointer); } public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, IntBuffer image) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter1D_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glConvolutionFilter1D_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOdisabled(); + GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, 1, 1)); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position() << 2, function_pointer); } public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ShortBuffer image) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter1D_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glConvolutionFilter1D_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOdisabled(); + GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, 1, 1)); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position() << 1, function_pointer); } private static native void nglConvolutionFilter1D(int target, int internalformat, int width, int format, int type, Buffer image, int image_position, long function_pointer); public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, long image_buffer_offset) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter1D_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glConvolutionFilter1D_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOenabled(); + GLChecks.ensureUnpackPBOenabled(caps); nglConvolutionFilter1DBO(target, internalformat, width, format, type, image_buffer_offset, function_pointer); } private static native void nglConvolutionFilter1DBO(int target, int internalformat, int width, int format, int type, long image_buffer_offset, long function_pointer); public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer image) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter2D_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glConvolutionFilter2D_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOdisabled(); + GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, height, 1)); nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position(), function_pointer); } public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer image) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter2D_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glConvolutionFilter2D_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOdisabled(); + GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, height, 1)); nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() << 2, function_pointer); } public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer image) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter2D_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glConvolutionFilter2D_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOdisabled(); + GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, height, 1)); nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() << 1, function_pointer); } private static native void nglConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer image, int image_position, long function_pointer); public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, long image_buffer_offset) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter2D_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glConvolutionFilter2D_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensureUnpackPBOenabled(); + GLChecks.ensureUnpackPBOenabled(caps); nglConvolutionFilter2DBO(target, internalformat, width, height, format, type, image_buffer_offset, function_pointer); } private static native void nglConvolutionFilter2DBO(int target, int internalformat, int width, int height, int format, int type, long image_buffer_offset, long function_pointer); public static void glConvolutionParameterf(int target, int pname, float params) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionParameterf_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glConvolutionParameterf_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglConvolutionParameterf(target, pname, params, function_pointer); } private static native void nglConvolutionParameterf(int target, int pname, float params, long function_pointer); public static void glConvolutionParameter(int target, int pname, FloatBuffer params) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionParameterfv_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glConvolutionParameterfv_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkBuffer(params, 4); nglConvolutionParameterfv(target, pname, params, params.position(), function_pointer); @@ -465,14 +516,16 @@ private static native void nglConvolutionParameterfv(int target, int pname, FloatBuffer params, int params_position, long function_pointer); public static void glConvolutionParameteri(int target, int pname, int params) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionParameteri_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glConvolutionParameteri_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglConvolutionParameteri(target, pname, params, function_pointer); } private static native void nglConvolutionParameteri(int target, int pname, int params, long function_pointer); public static void glConvolutionParameter(int target, int pname, IntBuffer params) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionParameteriv_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glConvolutionParameteriv_pointer; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkBuffer(params, 4); nglConvolutionParameteriv(target, pname, params, params.position(), function_pointer); @@ -480,65 +533,74 @@ private static native void nglConvolutionParameteriv(int target, int pname, IntBuffer params, int params_position, long function_pointer); public static void glCopyConvolutionFilter1D(int target, int internalformat, int x, int y, int width) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glCopyConvolutionFilter1D_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glCopyConvolutionFilter1D_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglCopyConvolutionFilter1D(target, internalformat, x, y, width, function_pointer); } private static native void nglCopyConvolutionFilter1D(int target, int internalformat, int x, int y, int width, long function_pointer); public static void glCopyConvolutionFilter2D(int target, int internalformat, int x, int y, int width, int height) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glCopyConvolutionFilter2D_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glCopyConvolutionFilter2D_pointer; BufferChecks.checkFunctionAddress(function_pointer); nglCopyConvolutionFilter2D(target, internalformat, x, y, width, height, function_pointer); } private static native void nglCopyConvolutionFilter2D(int target, int internalformat, int x, int y, int width, int height, long function_pointer); public static void glGetConvolutionFilter(int target, int format, int type, ByteBuffer image) { - long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetConvolutionFilter_pointer; + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.ARB_imaging_glGetConvolutionFilter_pointer; BufferChecks.checkFunctionAddress(function_pointer); - GLChecks.ensurePackPBOdisabled(); + GLChecks.ensurePackPBOdisabled(caps); Buffe... [truncated message content] |