Implemented strong references in glVertexPointer and friends

This commit is contained in:
Elias Naur 2005-03-21 08:27:45 +00:00
parent 665839e202
commit 87bf14c698
78 changed files with 1445 additions and 1058 deletions

View File

@ -206,7 +206,7 @@
</javac>
</target>
<target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities" description="Generates java and native source"/>
<target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references" description="Generates java and native source"/>
<target name="generate-openal" depends="generators" description="Generates java and native source for AL">
<!-- Generate OpenAL -->
@ -350,6 +350,20 @@
</apply>
</target>
<target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL">
<!-- Generate context capabilities -->
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.ReferencesGeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/java"/>
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/*.java"/>
</apply>
</target>
<target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL">
<!-- Generate context capabilities -->
<apply executable="apt" parallel="true">
@ -465,7 +479,7 @@
<include name="build.sh" />
</fileset>
</apply>
<move file="${lwjgl.src.native}/.libs/liblwjgl.0.0.0" tofile="${lwjgl.lib}/liblwjgl.so" />
<move file="${lwjgl.src.native}/linux/liblwjgl.so" tofile="${lwjgl.lib}/liblwjgl.so" />
</target>
<!-- Compiles LWJGL on Mac OS X platforms -->

View File

@ -36,9 +36,9 @@ public class ARBBufferObject {
private static native java.nio.ByteBuffer nglGetBufferPointervARB(int target, int pname, int result_size, long function_pointer);
public static void glGetBufferParameterARB(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glGetBufferParameterivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetBufferParameterivARB(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetBufferParameterivARB(int target, int pname, IntBuffer params, int params_position, long function_pointer);
@ -63,63 +63,63 @@ public class ARBBufferObject {
* @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) {
if (old_buffer != null)
BufferChecks.checkDirect(old_buffer);
long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glMapBufferARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
if (old_buffer != null)
BufferChecks.checkDirect(old_buffer);
java.nio.ByteBuffer __result = nglMapBufferARB(target, access, result_size, old_buffer, function_pointer);
return __result;
}
private static native java.nio.ByteBuffer nglMapBufferARB(int target, int access, int result_size, java.nio.ByteBuffer old_buffer, long function_pointer);
public static void glGetBufferSubDataARB(int target, int offset, ByteBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().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, int offset, FloatBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().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, int offset, IntBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().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, int offset, ShortBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glGetBufferSubDataARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglGetBufferSubDataARB(target, offset, (data.remaining() << 1), data, data.position() << 1, function_pointer);
}
private static native void nglGetBufferSubDataARB(int target, int offset, int size, Buffer data, int data_position, long function_pointer);
public static void glBufferSubDataARB(int target, int offset, ByteBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().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, int offset, FloatBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().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, int offset, IntBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().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, int offset, ShortBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBufferSubDataARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglBufferSubDataARB(target, offset, (data.remaining() << 1), data, data.position() << 1, function_pointer);
}
private static native void nglBufferSubDataARB(int target, int offset, int size, Buffer data, int data_position, long function_pointer);
@ -130,27 +130,27 @@ public class ARBBufferObject {
nglBufferDataARB(target, size, null, 0, usage, function_pointer);
}
public static void glBufferDataARB(int target, ByteBuffer data, int usage) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().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, FloatBuffer data, int usage) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().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) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().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) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBufferDataARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglBufferDataARB(target, (data.remaining() << 1), data, data.position() << 1, usage, function_pointer);
}
private static native void nglBufferDataARB(int target, int size, Buffer data, int data_position, int usage, long function_pointer);
@ -164,24 +164,24 @@ public class ARBBufferObject {
private static native boolean nglIsBufferARB(int buffer, long function_pointer);
public static void glGenBuffersARB(IntBuffer buffers) {
BufferChecks.checkDirect(buffers);
long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glGenBuffersARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(buffers);
nglGenBuffersARB((buffers.remaining()), buffers, buffers.position(), function_pointer);
}
private static native void nglGenBuffersARB(int n, IntBuffer buffers, int buffers_position, long function_pointer);
public static void glDeleteBuffersARB(IntBuffer buffers) {
BufferChecks.checkDirect(buffers);
BufferObjectTracker.deleteBuffers(buffers);
StateTracker.deleteBuffers(buffers);
long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glDeleteBuffersARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(buffers);
nglDeleteBuffersARB((buffers.remaining()), buffers, buffers.position(), function_pointer);
}
private static native void nglDeleteBuffersARB(int n, IntBuffer buffers, int buffers_position, long function_pointer);
public static void glBindBufferARB(int target, int buffer) {
BufferObjectTracker.bindBuffer(target, buffer);
StateTracker.bindBuffer(target, buffer);
long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBindBufferARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglBindBufferARB(target, buffer, function_pointer);

View File

@ -31,9 +31,9 @@ public final class ARBDrawBuffers {
static native void initNativeStubs() throws LWJGLException;
public static void glDrawBuffersARB(IntBuffer buffers) {
BufferChecks.checkDirect(buffers);
long function_pointer = GLContext.getCapabilities().ARB_draw_buffers_glDrawBuffersARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(buffers);
nglDrawBuffersARB((buffers.remaining()), buffers, buffers.position(), function_pointer);
}
private static native void nglDrawBuffersARB(int size, IntBuffer buffers, int buffers_position, long function_pointer);

File diff suppressed because it is too large Load Diff

View File

@ -24,55 +24,58 @@ public final class ARBMatrixPalette {
static native void initNativeStubs() throws LWJGLException;
public static void glMatrixIndexuARB(IntBuffer pIndices) {
BufferChecks.checkDirect(pIndices);
long function_pointer = GLContext.getCapabilities().ARB_matrix_palette_glMatrixIndexuivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pIndices);
nglMatrixIndexuivARB((pIndices.remaining()), pIndices, pIndices.position(), function_pointer);
}
private static native void nglMatrixIndexuivARB(int size, IntBuffer pIndices, int pIndices_position, long function_pointer);
public static void glMatrixIndexuARB(ShortBuffer pIndices) {
BufferChecks.checkDirect(pIndices);
long function_pointer = GLContext.getCapabilities().ARB_matrix_palette_glMatrixIndexusvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pIndices);
nglMatrixIndexusvARB((pIndices.remaining()), pIndices, pIndices.position(), function_pointer);
}
private static native void nglMatrixIndexusvARB(int size, ShortBuffer pIndices, int pIndices_position, long function_pointer);
public static void glMatrixIndexuARB(ByteBuffer pIndices) {
BufferChecks.checkDirect(pIndices);
long function_pointer = GLContext.getCapabilities().ARB_matrix_palette_glMatrixIndexubvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pIndices);
nglMatrixIndexubvARB((pIndices.remaining()), pIndices, pIndices.position(), function_pointer);
}
private static native void nglMatrixIndexubvARB(int size, ByteBuffer pIndices, int pIndices_position, long function_pointer);
public static void glMatrixIndexPointerARB(int size, int stride, ByteBuffer pPointer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ARB_matrix_palette_glMatrixIndexPointerARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
GLChecks.getReferences().ARB_matrix_palette_glMatrixIndexPointerARB_pPointer = pPointer;
nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_BYTE, stride, pPointer, pPointer.position(), function_pointer);
}
public static void glMatrixIndexPointerARB(int size, int stride, IntBuffer pPointer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ARB_matrix_palette_glMatrixIndexPointerARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
GLChecks.getReferences().ARB_matrix_palette_glMatrixIndexPointerARB_pPointer = pPointer;
nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_INT, stride, pPointer, pPointer.position() << 2, function_pointer);
}
public static void glMatrixIndexPointerARB(int size, int stride, ShortBuffer pPointer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ARB_matrix_palette_glMatrixIndexPointerARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
GLChecks.getReferences().ARB_matrix_palette_glMatrixIndexPointerARB_pPointer = pPointer;
nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_SHORT, stride, pPointer, pPointer.position() << 1, function_pointer);
}
private static native void nglMatrixIndexPointerARB(int size, int type, int stride, Buffer pPointer, int pPointer_position, long function_pointer);
public static void glMatrixIndexPointerARB(int size, int type, int stride, int pPointer_buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_matrix_palette_glMatrixIndexPointerARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOenabled();
nglMatrixIndexPointerARBBO(size, type, stride, pPointer_buffer_offset, function_pointer);
}
private static native void nglMatrixIndexPointerARBBO(int size, int type, int stride, int pPointer_buffer_offset, long function_pointer);

View File

@ -19,25 +19,25 @@ public final class ARBOcclusionQuery {
static native void initNativeStubs() throws LWJGLException;
public static void glGetQueryObjectuARB(int id, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_occlusion_query_glGetQueryObjectuivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetQueryObjectuivARB(id, pname, params, params.position(), function_pointer);
}
private static native void nglGetQueryObjectuivARB(int id, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetQueryObjectARB(int id, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_occlusion_query_glGetQueryObjectivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetQueryObjectivARB(id, pname, params, params.position(), function_pointer);
}
private static native void nglGetQueryObjectivARB(int id, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetQueryARB(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_occlusion_query_glGetQueryivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetQueryivARB(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetQueryivARB(int target, int pname, IntBuffer params, int params_position, long function_pointer);
@ -65,17 +65,17 @@ public final class ARBOcclusionQuery {
private static native boolean nglIsQueryARB(int id, long function_pointer);
public static void glDeleteQueriesARB(IntBuffer ids) {
BufferChecks.checkDirect(ids);
long function_pointer = GLContext.getCapabilities().ARB_occlusion_query_glDeleteQueriesARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(ids);
nglDeleteQueriesARB((ids.remaining()), ids, ids.position(), function_pointer);
}
private static native void nglDeleteQueriesARB(int n, IntBuffer ids, int ids_position, long function_pointer);
public static void glGenQueriesARB(IntBuffer ids) {
BufferChecks.checkDirect(ids);
long function_pointer = GLContext.getCapabilities().ARB_occlusion_query_glGenQueriesARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(ids);
nglGenQueriesARB((ids.remaining()), ids, ids.position(), function_pointer);
}
private static native void nglGenQueriesARB(int n, IntBuffer ids, int ids_position, long function_pointer);

View File

@ -18,9 +18,9 @@ public final class ARBPointParameters {
static native void initNativeStubs() throws LWJGLException;
public static void glPointParameterARB(int pname, FloatBuffer pfParams) {
BufferChecks.checkBuffer(pfParams, 4);
long function_pointer = GLContext.getCapabilities().ARB_point_parameters_glPointParameterfvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pfParams, 4);
nglPointParameterfvARB(pname, pfParams, pfParams.position(), function_pointer);
}
private static native void nglPointParameterfvARB(int pname, FloatBuffer pfParams, int pfParams_position, long function_pointer);

View File

@ -82,41 +82,41 @@ public class ARBProgram {
private static native boolean nglIsProgramARB(int program, long function_pointer);
public static void glGetProgramStringARB(int target, int parameterName, ByteBuffer paramString) {
BufferChecks.checkDirect(paramString);
long function_pointer = GLContext.getCapabilities().ARB_program_glGetProgramStringARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(paramString);
nglGetProgramStringARB(target, parameterName, paramString, paramString.position(), function_pointer);
}
private static native void nglGetProgramStringARB(int target, int parameterName, Buffer paramString, int paramString_position, long function_pointer);
public static void glGetProgramARB(int target, int parameterName, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_program_glGetProgramivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetProgramivARB(target, parameterName, params, params.position(), function_pointer);
}
private static native void nglGetProgramivARB(int target, int parameterName, IntBuffer params, int params_position, long function_pointer);
public static void glGetProgramLocalParameterARB(int target, int index, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_program_glGetProgramLocalParameterfvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetProgramLocalParameterfvARB(target, index, params, params.position(), function_pointer);
}
private static native void nglGetProgramLocalParameterfvARB(int target, int index, FloatBuffer params, int params_position, long function_pointer);
public static void glGetProgramEnvParameterARB(int target, int index, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_program_glGetProgramEnvParameterfvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetProgramEnvParameterfvARB(target, index, params, params.position(), function_pointer);
}
private static native void nglGetProgramEnvParameterfvARB(int target, int index, FloatBuffer params, int params_position, long function_pointer);
public static void glProgramLocalParameter4ARB(int target, int index, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_program_glProgramLocalParameter4fvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglProgramLocalParameter4fvARB(target, index, params, params.position(), function_pointer);
}
private static native void nglProgramLocalParameter4fvARB(int target, int index, FloatBuffer params, int params_position, long function_pointer);
@ -129,9 +129,9 @@ public class ARBProgram {
private static native void nglProgramLocalParameter4fARB(int target, int index, float x, float y, float z, float w, long function_pointer);
public static void glProgramEnvParameter4ARB(int target, int index, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_program_glProgramEnvParameter4fvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglProgramEnvParameter4fvARB(target, index, params, params.position(), function_pointer);
}
private static native void nglProgramEnvParameter4fvARB(int target, int index, FloatBuffer params, int params_position, long function_pointer);
@ -144,17 +144,17 @@ public class ARBProgram {
private static native void nglProgramEnvParameter4fARB(int target, int index, float x, float y, float z, float w, long function_pointer);
public static void glGenProgramsARB(IntBuffer programs) {
BufferChecks.checkDirect(programs);
long function_pointer = GLContext.getCapabilities().ARB_program_glGenProgramsARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(programs);
nglGenProgramsARB((programs.remaining()), programs, programs.position(), function_pointer);
}
private static native void nglGenProgramsARB(int n, IntBuffer programs, int programs_position, long function_pointer);
public static void glDeleteProgramsARB(IntBuffer programs) {
BufferChecks.checkDirect(programs);
long function_pointer = GLContext.getCapabilities().ARB_program_glDeleteProgramsARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(programs);
nglDeleteProgramsARB((programs.remaining()), programs, programs.position(), function_pointer);
}
private static native void nglDeleteProgramsARB(int n, IntBuffer programs, int programs_position, long function_pointer);
@ -167,9 +167,9 @@ public class ARBProgram {
private static native void nglBindProgramARB(int target, int program, long function_pointer);
public static void glProgramStringARB(int target, int format, ByteBuffer string) {
BufferChecks.checkDirect(string);
long function_pointer = GLContext.getCapabilities().ARB_program_glProgramStringARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(string);
nglProgramStringARB(target, format, (string.remaining()), string, string.position(), function_pointer);
}
private static native void nglProgramStringARB(int target, int format, int length, Buffer string, int string_position, long function_pointer);

View File

@ -50,39 +50,39 @@ public final class ARBShaderObjects {
static native void initNativeStubs() throws LWJGLException;
public static void glGetShaderSourceARB(int obj, IntBuffer length, ByteBuffer source) {
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glGetShaderSourceARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
if (length != null)
BufferChecks.checkBuffer(length, 1);
BufferChecks.checkDirect(source);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glGetShaderSourceARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglGetShaderSourceARB(obj, (source.remaining()), length, length != null ? length.position() : 0, source, source.position(), function_pointer);
}
private static native void nglGetShaderSourceARB(int obj, int maxLength, IntBuffer length, int length_position, ByteBuffer source, int source_position, long function_pointer);
public static void glGetUniformARB(int programObj, int location, IntBuffer params) {
BufferChecks.checkDirect(params);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glGetUniformivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(params);
nglGetUniformivARB(programObj, location, params, params.position(), function_pointer);
}
private static native void nglGetUniformivARB(int programObj, int location, IntBuffer params, int params_position, long function_pointer);
public static void glGetUniformARB(int programObj, int location, FloatBuffer params) {
BufferChecks.checkDirect(params);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glGetUniformfvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(params);
nglGetUniformfvARB(programObj, location, params, params.position(), function_pointer);
}
private static native void nglGetUniformfvARB(int programObj, int location, FloatBuffer params, int params_position, long function_pointer);
public static void glGetActiveUniformARB(int programObj, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) {
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glGetActiveUniformARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
if (length != null)
BufferChecks.checkBuffer(length, 1);
BufferChecks.checkBuffer(size, 1);
BufferChecks.checkBuffer(type, 1);
BufferChecks.checkDirect(name);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glGetActiveUniformARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglGetActiveUniformARB(programObj, index, (name.remaining()), length, length != null ? length.position() : 0, size, size.position(), type, type.position(), name, name.position(), function_pointer);
}
private static native void nglGetActiveUniformARB(int programObj, int index, int maxLength, IntBuffer length, int length_position, IntBuffer size, int size_position, IntBuffer type, int type_position, ByteBuffer name, int name_position, long function_pointer);
@ -94,135 +94,135 @@ public final class ARBShaderObjects {
* @return
*/
public static int glGetUniformLocationARB(int programObj, ByteBuffer name) {
BufferChecks.checkDirect(name);
BufferChecks.checkNullTerminated(name);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glGetUniformLocationARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(name);
BufferChecks.checkNullTerminated(name);
int __result = nglGetUniformLocationARB(programObj, name, name.position(), function_pointer);
return __result;
}
private static native int nglGetUniformLocationARB(int programObj, ByteBuffer name, int name_position, long function_pointer);
public static void glGetAttachedObjectsARB(int containerObj, IntBuffer count, IntBuffer obj) {
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glGetAttachedObjectsARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
if (count != null)
BufferChecks.checkBuffer(count, 1);
BufferChecks.checkDirect(obj);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glGetAttachedObjectsARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglGetAttachedObjectsARB(containerObj, (obj.remaining()), count, count != null ? count.position() : 0, obj, obj.position(), function_pointer);
}
private static native void nglGetAttachedObjectsARB(int containerObj, int maxCount, IntBuffer count, int count_position, IntBuffer obj, int obj_position, long function_pointer);
public static void glGetInfoLogARB(int obj, IntBuffer length, ByteBuffer infoLog) {
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glGetInfoLogARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
if (length != null)
BufferChecks.checkBuffer(length, 1);
BufferChecks.checkDirect(infoLog);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glGetInfoLogARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglGetInfoLogARB(obj, (infoLog.remaining()), length, length != null ? length.position() : 0, infoLog, infoLog.position(), function_pointer);
}
private static native void nglGetInfoLogARB(int obj, int maxLength, IntBuffer length, int length_position, ByteBuffer infoLog, int infoLog_position, long function_pointer);
public static void glGetObjectParameterARB(int obj, int pname, IntBuffer params) {
BufferChecks.checkDirect(params);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glGetObjectParameterivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(params);
nglGetObjectParameterivARB(obj, pname, params, params.position(), function_pointer);
}
private static native void nglGetObjectParameterivARB(int obj, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetObjectParameterARB(int obj, int pname, FloatBuffer params) {
BufferChecks.checkDirect(params);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glGetObjectParameterfvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(params);
nglGetObjectParameterfvARB(obj, pname, params, params.position(), function_pointer);
}
private static native void nglGetObjectParameterfvARB(int obj, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glUniformMatrix4ARB(int location, boolean transpose, FloatBuffer matrices) {
BufferChecks.checkDirect(matrices);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glUniformMatrix4fvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(matrices);
nglUniformMatrix4fvARB(location, (matrices.remaining()) >> 4, transpose, matrices, matrices.position(), function_pointer);
}
private static native void nglUniformMatrix4fvARB(int location, int count, boolean transpose, FloatBuffer matrices, int matrices_position, long function_pointer);
public static void glUniformMatrix3ARB(int location, boolean transpose, FloatBuffer matrices) {
BufferChecks.checkDirect(matrices);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glUniformMatrix3fvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(matrices);
nglUniformMatrix3fvARB(location, (matrices.remaining()) / (3 * 3), transpose, matrices, matrices.position(), function_pointer);
}
private static native void nglUniformMatrix3fvARB(int location, int count, boolean transpose, FloatBuffer matrices, int matrices_position, long function_pointer);
public static void glUniformMatrix2ARB(int location, boolean transpose, FloatBuffer matrices) {
BufferChecks.checkDirect(matrices);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glUniformMatrix2fvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(matrices);
nglUniformMatrix2fvARB(location, (matrices.remaining()) >> 2, transpose, matrices, matrices.position(), function_pointer);
}
private static native void nglUniformMatrix2fvARB(int location, int count, boolean transpose, FloatBuffer matrices, int matrices_position, long function_pointer);
public static void glUniform4ARB(int location, IntBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glUniform4ivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform4ivARB(location, (values.remaining()) >> 2, values, values.position(), function_pointer);
}
private static native void nglUniform4ivARB(int location, int count, IntBuffer values, int values_position, long function_pointer);
public static void glUniform3ARB(int location, IntBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glUniform3ivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform3ivARB(location, (values.remaining()) / 3, values, values.position(), function_pointer);
}
private static native void nglUniform3ivARB(int location, int count, IntBuffer values, int values_position, long function_pointer);
public static void glUniform2ARB(int location, IntBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glUniform2ivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform2ivARB(location, (values.remaining()) >> 1, values, values.position(), function_pointer);
}
private static native void nglUniform2ivARB(int location, int count, IntBuffer values, int values_position, long function_pointer);
public static void glUniform1ARB(int location, IntBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glUniform1ivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform1ivARB(location, (values.remaining()), values, values.position(), function_pointer);
}
private static native void nglUniform1ivARB(int location, int count, IntBuffer values, int values_position, long function_pointer);
public static void glUniform4ARB(int location, FloatBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glUniform4fvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform4fvARB(location, (values.remaining()) >> 2, values, values.position(), function_pointer);
}
private static native void nglUniform4fvARB(int location, int count, FloatBuffer values, int values_position, long function_pointer);
public static void glUniform3ARB(int location, FloatBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glUniform3fvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform3fvARB(location, (values.remaining()) / 3, values, values.position(), function_pointer);
}
private static native void nglUniform3fvARB(int location, int count, FloatBuffer values, int values_position, long function_pointer);
public static void glUniform2ARB(int location, FloatBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glUniform2fvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform2fvARB(location, (values.remaining()) >> 1, values, values.position(), function_pointer);
}
private static native void nglUniform2fvARB(int location, int count, FloatBuffer values, int values_position, long function_pointer);
public static void glUniform1ARB(int location, FloatBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glUniform1fvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform1fvARB(location, (values.remaining()), values, values.position(), function_pointer);
}
private static native void nglUniform1fvARB(int location, int count, FloatBuffer values, int values_position, long function_pointer);
@ -334,9 +334,9 @@ public final class ARBShaderObjects {
* @param string
*/
public static void glShaderSourceARB(int shader, ByteBuffer string) {
BufferChecks.checkDirect(string);
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glShaderSourceARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(string);
nglShaderSourceARB(shader, 1, string, string.position(), (string.remaining()), function_pointer);
}
private static native void nglShaderSourceARB(int shader, int count, ByteBuffer string, int string_position, int length, long function_pointer);

View File

@ -25,260 +25,260 @@ public final class ARBTextureCompression {
static native void initNativeStubs() throws LWJGLException;
public static void glGetCompressedTexImageARB(int target, int lod, ByteBuffer pImg) {
GLBufferChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(pImg);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glGetCompressedTexImageARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(pImg);
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position(), function_pointer);
}
public static void glGetCompressedTexImageARB(int target, int lod, FloatBuffer pImg) {
GLBufferChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(pImg);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glGetCompressedTexImageARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(pImg);
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position() << 2, function_pointer);
}
public static void glGetCompressedTexImageARB(int target, int lod, IntBuffer pImg) {
GLBufferChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(pImg);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glGetCompressedTexImageARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(pImg);
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position() << 2, function_pointer);
}
public static void glGetCompressedTexImageARB(int target, int lod, ShortBuffer pImg) {
GLBufferChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(pImg);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glGetCompressedTexImageARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(pImg);
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position() << 1, function_pointer);
}
private static native void nglGetCompressedTexImageARB(int target, int lod, Buffer pImg, int pImg_position, long function_pointer);
public static void glGetCompressedTexImageARB(int target, int lod, int pImg_buffer_offset) {
GLBufferChecks.ensurePackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glGetCompressedTexImageARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensurePackPBOenabled();
nglGetCompressedTexImageARBBO(target, lod, pImg_buffer_offset, function_pointer);
}
private static native void nglGetCompressedTexImageARBBO(int target, int lod, int pImg_buffer_offset, long function_pointer);
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ByteBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage3DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position(), function_pointer);
}
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, FloatBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage3DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position() << 2, function_pointer);
}
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, IntBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage3DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position() << 2, function_pointer);
}
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ShortBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage3DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position() << 1, function_pointer);
}
private static native void nglCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, Buffer pData, int pData_position, long function_pointer);
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, int pData_buffer_offset) {
GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage3DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOenabled();
nglCompressedTexSubImage3DARBBO(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData_buffer_offset, function_pointer);
}
private static native void nglCompressedTexSubImage3DARBBO(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, int pData_buffer_offset, long function_pointer);
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ByteBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage2DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position(), function_pointer);
}
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, FloatBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage2DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position() << 2, function_pointer);
}
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, IntBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage2DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position() << 2, function_pointer);
}
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ShortBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage2DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position() << 1, function_pointer);
}
private static native void nglCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, Buffer pData, int pData_position, long function_pointer);
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, int pData_buffer_offset) {
GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage2DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOenabled();
nglCompressedTexSubImage2DARBBO(target, level, xoffset, yoffset, width, height, format, imageSize, pData_buffer_offset, function_pointer);
}
private static native void nglCompressedTexSubImage2DARBBO(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, int pData_buffer_offset, long function_pointer);
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, ByteBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage1DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position(), function_pointer);
}
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, FloatBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage1DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position() << 2, function_pointer);
}
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, IntBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage1DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position() << 2, function_pointer);
}
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, ShortBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage1DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position() << 1, function_pointer);
}
private static native void nglCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, Buffer pData, int pData_position, long function_pointer);
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, int pData_buffer_offset) {
GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexSubImage1DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOenabled();
nglCompressedTexSubImage1DARBBO(target, level, xoffset, width, format, imageSize, pData_buffer_offset, function_pointer);
}
private static native void nglCompressedTexSubImage1DARBBO(int target, int level, int xoffset, int width, int format, int imageSize, int pData_buffer_offset, long function_pointer);
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ByteBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage3DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position(), function_pointer);
}
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, FloatBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage3DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position() << 2, function_pointer);
}
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, IntBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage3DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position() << 2, function_pointer);
}
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ShortBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage3DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position() << 1, function_pointer);
}
private static native void nglCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, Buffer pData, int pData_position, long function_pointer);
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, int pData_buffer_offset) {
GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage3DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOenabled();
nglCompressedTexImage3DARBBO(target, level, internalformat, width, height, depth, border, imageSize, pData_buffer_offset, function_pointer);
}
private static native void nglCompressedTexImage3DARBBO(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, int pData_buffer_offset, long function_pointer);
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, ByteBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage2DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position(), function_pointer);
}
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, FloatBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage2DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position() << 2, function_pointer);
}
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, IntBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage2DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position() << 2, function_pointer);
}
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, ShortBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage2DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position() << 1, function_pointer);
}
private static native void nglCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, Buffer pData, int pData_position, long function_pointer);
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, int pData_buffer_offset) {
GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage2DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOenabled();
nglCompressedTexImage2DARBBO(target, level, internalformat, width, height, border, imageSize, pData_buffer_offset, function_pointer);
}
private static native void nglCompressedTexImage2DARBBO(int target, int level, int internalformat, int width, int height, int border, int imageSize, int pData_buffer_offset, long function_pointer);
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, ByteBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage1DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position(), function_pointer);
}
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, FloatBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage1DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position() << 2, function_pointer);
}
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, IntBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage1DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position() << 2, function_pointer);
}
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, ShortBuffer pData) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage1DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(pData);
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position() << 1, function_pointer);
}
private static native void nglCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, Buffer pData, int pData_position, long function_pointer);
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, int pData_buffer_offset) {
GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glCompressedTexImage1DARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOenabled();
nglCompressedTexImage1DARBBO(target, level, internalformat, width, border, imageSize, pData_buffer_offset, function_pointer);
}
private static native void nglCompressedTexImage1DARBBO(int target, int level, int internalformat, int width, int border, int imageSize, int pData_buffer_offset, long function_pointer);

View File

@ -18,17 +18,17 @@ public final class ARBTransposeMatrix {
static native void initNativeStubs() throws LWJGLException;
public static void glMultTransposeMatrixARB(FloatBuffer pfMtx) {
BufferChecks.checkBuffer(pfMtx, 16);
long function_pointer = GLContext.getCapabilities().ARB_transpose_matrix_glMultTransposeMatrixfARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pfMtx, 16);
nglMultTransposeMatrixfARB(pfMtx, pfMtx.position(), function_pointer);
}
private static native void nglMultTransposeMatrixfARB(FloatBuffer pfMtx, int pfMtx_position, long function_pointer);
public static void glLoadTransposeMatrixARB(FloatBuffer pfMtx) {
BufferChecks.checkBuffer(pfMtx, 16);
long function_pointer = GLContext.getCapabilities().ARB_transpose_matrix_glLoadTransposeMatrixfARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pfMtx, 16);
nglLoadTransposeMatrixfARB(pfMtx, pfMtx.position(), function_pointer);
}
private static native void nglLoadTransposeMatrixfARB(FloatBuffer pfMtx, int pfMtx_position, long function_pointer);

View File

@ -63,94 +63,98 @@ public final class ARBVertexBlend {
private static native void nglVertexBlendARB(int count, long function_pointer);
public static void glWeightPointerARB(int size, int stride, FloatBuffer pPointer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ARB_vertex_blend_glWeightPointerARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
GLChecks.getReferences().ARB_vertex_blend_glWeightPointerARB_pPointer = pPointer;
nglWeightPointerARB(size, GL11.GL_FLOAT, stride, pPointer, pPointer.position() << 2, function_pointer);
}
public static void glWeightPointerARB(int size, boolean unsigned, int stride, ByteBuffer pPointer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ARB_vertex_blend_glWeightPointerARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
GLChecks.getReferences().ARB_vertex_blend_glWeightPointerARB_pPointer = pPointer;
nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pPointer, pPointer.position(), function_pointer);
}
public static void glWeightPointerARB(int size, boolean unsigned, int stride, IntBuffer pPointer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ARB_vertex_blend_glWeightPointerARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
GLChecks.getReferences().ARB_vertex_blend_glWeightPointerARB_pPointer = pPointer;
nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, stride, pPointer, pPointer.position() << 2, function_pointer);
}
public static void glWeightPointerARB(int size, boolean unsigned, int stride, ShortBuffer pPointer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ARB_vertex_blend_glWeightPointerARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
GLChecks.getReferences().ARB_vertex_blend_glWeightPointerARB_pPointer = pPointer;
nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, pPointer, pPointer.position() << 1, function_pointer);
}
private static native void nglWeightPointerARB(int size, int type, int stride, Buffer pPointer, int pPointer_position, long function_pointer);
public static void glWeightPointerARB(int size, int type, int stride, int pPointer_buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_vertex_blend_glWeightPointerARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOenabled();
nglWeightPointerARBBO(size, type, stride, pPointer_buffer_offset, function_pointer);
}
private static native void nglWeightPointerARBBO(int size, int type, int stride, int pPointer_buffer_offset, long function_pointer);
public static void glWeightuARB(IntBuffer pWeights) {
BufferChecks.checkDirect(pWeights);
long function_pointer = GLContext.getCapabilities().ARB_vertex_blend_glWeightuivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pWeights);
nglWeightuivARB((pWeights.remaining()), pWeights, pWeights.position(), function_pointer);
}
private static native void nglWeightuivARB(int size, IntBuffer pWeights, int pWeights_position, long function_pointer);
public static void glWeightuARB(ShortBuffer pWeights) {
BufferChecks.checkDirect(pWeights);
long function_pointer = GLContext.getCapabilities().ARB_vertex_blend_glWeightusvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pWeights);
nglWeightusvARB((pWeights.remaining()), pWeights, pWeights.position(), function_pointer);
}
private static native void nglWeightusvARB(int size, ShortBuffer pWeights, int pWeights_position, long function_pointer);
public static void glWeightuARB(ByteBuffer pWeights) {
BufferChecks.checkDirect(pWeights);
long function_pointer = GLContext.getCapabilities().ARB_vertex_blend_glWeightubvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pWeights);
nglWeightubvARB((pWeights.remaining()), pWeights, pWeights.position(), function_pointer);
}
private static native void nglWeightubvARB(int size, ByteBuffer pWeights, int pWeights_position, long function_pointer);
public static void glWeightARB(FloatBuffer pWeights) {
BufferChecks.checkDirect(pWeights);
long function_pointer = GLContext.getCapabilities().ARB_vertex_blend_glWeightfvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pWeights);
nglWeightfvARB((pWeights.remaining()), pWeights, pWeights.position(), function_pointer);
}
private static native void nglWeightfvARB(int size, FloatBuffer pWeights, int pWeights_position, long function_pointer);
public static void glWeightARB(IntBuffer pWeights) {
BufferChecks.checkDirect(pWeights);
long function_pointer = GLContext.getCapabilities().ARB_vertex_blend_glWeightivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pWeights);
nglWeightivARB((pWeights.remaining()), pWeights, pWeights.position(), function_pointer);
}
private static native void nglWeightivARB(int size, IntBuffer pWeights, int pWeights_position, long function_pointer);
public static void glWeightARB(ShortBuffer pWeights) {
BufferChecks.checkDirect(pWeights);
long function_pointer = GLContext.getCapabilities().ARB_vertex_blend_glWeightsvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pWeights);
nglWeightsvARB((pWeights.remaining()), pWeights, pWeights.position(), function_pointer);
}
private static native void nglWeightsvARB(int size, ShortBuffer pWeights, int pWeights_position, long function_pointer);
public static void glWeightARB(ByteBuffer pWeights) {
BufferChecks.checkDirect(pWeights);
long function_pointer = GLContext.getCapabilities().ARB_vertex_blend_glWeightbvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pWeights);
nglWeightbvARB((pWeights.remaining()), pWeights, pWeights.position(), function_pointer);
}
private static native void nglWeightbvARB(int size, ByteBuffer pWeights, int pWeights_position, long function_pointer);

View File

@ -38,17 +38,17 @@ public final class ARBVertexProgram extends ARBProgram {
private static native java.nio.ByteBuffer nglGetVertexAttribPointervARB(int index, int pname, int result_size, long function_pointer);
public static void glGetVertexAttribARB(int index, int pname, IntBuffer params) {
BufferChecks.checkDirect(params);
long function_pointer = GLContext.getCapabilities().ARB_vertex_program_glGetVertexAttribivARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(params);
nglGetVertexAttribivARB(index, pname, params, params.position(), function_pointer);
}
private static native void nglGetVertexAttribivARB(int index, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetVertexAttribARB(int index, int pname, FloatBuffer params) {
BufferChecks.checkDirect(params);
long function_pointer = GLContext.getCapabilities().ARB_vertex_program_glGetVertexAttribfvARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(params);
nglGetVertexAttribfvARB(index, pname, params, params.position(), function_pointer);
}
private static native void nglGetVertexAttribfvARB(int index, int pname, FloatBuffer params, int params_position, long function_pointer);
@ -68,38 +68,42 @@ public final class ARBVertexProgram extends ARBProgram {
private static native void nglEnableVertexAttribArrayARB(int index, long function_pointer);
public static void glVertexAttribPointerARB(int index, int size, boolean normalized, int stride, FloatBuffer buffer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
long function_pointer = GLContext.getCapabilities().ARB_vertex_program_glVertexAttribPointerARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
GLChecks.getReferences().ARB_vertex_program_glVertexAttribPointerARB_buffer = buffer;
nglVertexAttribPointerARB(index, size, GL11.GL_FLOAT, normalized, stride, buffer, buffer.position() << 2, function_pointer);
}
public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
long function_pointer = GLContext.getCapabilities().ARB_vertex_program_glVertexAttribPointerARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
GLChecks.getReferences().ARB_vertex_program_glVertexAttribPointerARB_buffer = buffer;
nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, normalized, stride, buffer, buffer.position(), function_pointer);
}
public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, IntBuffer buffer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
long function_pointer = GLContext.getCapabilities().ARB_vertex_program_glVertexAttribPointerARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
GLChecks.getReferences().ARB_vertex_program_glVertexAttribPointerARB_buffer = buffer;
nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, normalized, stride, buffer, buffer.position() << 2, function_pointer);
}
public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ShortBuffer buffer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
long function_pointer = GLContext.getCapabilities().ARB_vertex_program_glVertexAttribPointerARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
GLChecks.getReferences().ARB_vertex_program_glVertexAttribPointerARB_buffer = buffer;
nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, normalized, stride, buffer, buffer.position() << 1, function_pointer);
}
private static native void nglVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, Buffer buffer, int buffer_position, long function_pointer);
public static void glVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, int buffer_buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_vertex_program_glVertexAttribPointerARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOenabled();
nglVertexAttribPointerARBBO(index, size, type, normalized, stride, buffer_buffer_offset, function_pointer);
}
private static native void nglVertexAttribPointerARBBO(int index, int size, int type, boolean normalized, int stride, int buffer_buffer_offset, long function_pointer);

View File

@ -40,32 +40,32 @@ public final class ARBVertexShader {
static native void initNativeStubs() throws LWJGLException;
public static int glGetAttribLocationARB(int programObj, ByteBuffer name) {
BufferChecks.checkDirect(name);
BufferChecks.checkNullTerminated(name);
long function_pointer = GLContext.getCapabilities().ARB_vertex_shader_glGetAttribLocationARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(name);
BufferChecks.checkNullTerminated(name);
int __result = nglGetAttribLocationARB(programObj, name, name.position(), function_pointer);
return __result;
}
private static native int nglGetAttribLocationARB(int programObj, ByteBuffer name, int name_position, long function_pointer);
public static void glGetActiveAttribARB(int programObj, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) {
long function_pointer = GLContext.getCapabilities().ARB_vertex_shader_glGetActiveAttribARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
if (length != null)
BufferChecks.checkBuffer(length, 1);
BufferChecks.checkBuffer(size, 1);
BufferChecks.checkBuffer(type, 1);
BufferChecks.checkDirect(name);
long function_pointer = GLContext.getCapabilities().ARB_vertex_shader_glGetActiveAttribARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglGetActiveAttribARB(programObj, index, (name.remaining()), length, length != null ? length.position() : 0, size, size.position(), type, type.position(), name, name.position(), function_pointer);
}
private static native void nglGetActiveAttribARB(int programObj, int index, int maxLength, IntBuffer length, int length_position, IntBuffer size, int size_position, IntBuffer type, int type_position, ByteBuffer name, int name_position, long function_pointer);
public static void glBindAttribLocationARB(int programObj, int index, ByteBuffer name) {
BufferChecks.checkDirect(name);
BufferChecks.checkNullTerminated(name);
long function_pointer = GLContext.getCapabilities().ARB_vertex_shader_glBindAttribLocationARB_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(name);
BufferChecks.checkNullTerminated(name);
nglBindAttribLocationARB(programObj, index, name, name.position(), function_pointer);
}
private static native void nglBindAttribLocationARB(int programObj, int index, ByteBuffer name, int name_position, long function_pointer);

View File

@ -31,9 +31,9 @@ public final class ATIDrawBuffers {
static native void initNativeStubs() throws LWJGLException;
public static void glDrawBuffersATI(IntBuffer buffers) {
BufferChecks.checkDirect(buffers);
long function_pointer = GLContext.getCapabilities().ATI_draw_buffers_glDrawBuffersATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(buffers);
nglDrawBuffersATI((buffers.remaining()), buffers, buffers.position(), function_pointer);
}
private static native void nglDrawBuffersATI(int size, IntBuffer buffers, int buffers_position, long function_pointer);

View File

@ -31,31 +31,34 @@ public final class ATIElementArray {
private static native void nglDrawElementArrayATI(int mode, int count, long function_pointer);
public static void glElementPointerATI(ByteBuffer pPointer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ATI_element_array_glElementPointerATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
GLChecks.getReferences().ATI_element_array_glElementPointerATI_pPointer = pPointer;
nglElementPointerATI(GL11.GL_UNSIGNED_BYTE, pPointer, pPointer.position(), function_pointer);
}
public static void glElementPointerATI(IntBuffer pPointer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ATI_element_array_glElementPointerATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
GLChecks.getReferences().ATI_element_array_glElementPointerATI_pPointer = pPointer;
nglElementPointerATI(GL11.GL_UNSIGNED_INT, pPointer, pPointer.position() << 2, function_pointer);
}
public static void glElementPointerATI(ShortBuffer pPointer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ATI_element_array_glElementPointerATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
GLChecks.getReferences().ATI_element_array_glElementPointerATI_pPointer = pPointer;
nglElementPointerATI(GL11.GL_UNSIGNED_SHORT, pPointer, pPointer.position() << 1, function_pointer);
}
private static native void nglElementPointerATI(int type, Buffer pPointer, int pPointer_position, long function_pointer);
public static void glElementPointerATI(int type, int pPointer_buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().ATI_element_array_glElementPointerATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOenabled();
nglElementPointerATIBO(type, pPointer_buffer_offset, function_pointer);
}
private static native void nglElementPointerATIBO(int type, int pPointer_buffer_offset, long function_pointer);

View File

@ -22,33 +22,33 @@ public final class ATIEnvmapBumpmap {
static native void initNativeStubs() throws LWJGLException;
public static void glGetTexBumpParameterATI(int pname, IntBuffer param) {
BufferChecks.checkBuffer(param, 4);
long function_pointer = GLContext.getCapabilities().ATI_envmap_bumpmap_glGetTexBumpParameterivATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(param, 4);
nglGetTexBumpParameterivATI(pname, param, param.position(), function_pointer);
}
private static native void nglGetTexBumpParameterivATI(int pname, IntBuffer param, int param_position, long function_pointer);
public static void glGetTexBumpParameterATI(int pname, FloatBuffer param) {
BufferChecks.checkBuffer(param, 4);
long function_pointer = GLContext.getCapabilities().ATI_envmap_bumpmap_glGetTexBumpParameterfvATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(param, 4);
nglGetTexBumpParameterfvATI(pname, param, param.position(), function_pointer);
}
private static native void nglGetTexBumpParameterfvATI(int pname, FloatBuffer param, int param_position, long function_pointer);
public static void glTexBumpParameterATI(int pname, IntBuffer param) {
BufferChecks.checkBuffer(param, 4);
long function_pointer = GLContext.getCapabilities().ATI_envmap_bumpmap_glTexBumpParameterivATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(param, 4);
nglTexBumpParameterivATI(pname, param, param.position(), function_pointer);
}
private static native void nglTexBumpParameterivATI(int pname, IntBuffer param, int param_position, long function_pointer);
public static void glTexBumpParameterATI(int pname, FloatBuffer param) {
BufferChecks.checkBuffer(param, 4);
long function_pointer = GLContext.getCapabilities().ATI_envmap_bumpmap_glTexBumpParameterfvATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(param, 4);
nglTexBumpParameterfvATI(pname, param, param.position(), function_pointer);
}
private static native void nglTexBumpParameterfvATI(int pname, FloatBuffer param, int param_position, long function_pointer);

View File

@ -118,9 +118,9 @@ public final class ATIFragmentShader {
static native void initNativeStubs() throws LWJGLException;
public static void glSetFragmentShaderConstantATI(int dst, FloatBuffer pfValue) {
BufferChecks.checkBuffer(pfValue, 4);
long function_pointer = GLContext.getCapabilities().ATI_fragment_shader_glSetFragmentShaderConstantATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pfValue, 4);
nglSetFragmentShaderConstantATI(dst, pfValue, pfValue.position(), function_pointer);
}
private static native void nglSetFragmentShaderConstantATI(int dst, FloatBuffer pfValue, int pfValue_position, long function_pointer);

View File

@ -32,10 +32,10 @@ public final class ATIMapObjectBuffer {
* @return A ByteBuffer representing the mapped object buffer memory.
*/
public static java.nio.ByteBuffer glMapObjectBufferATI(int buffer, int result_size, java.nio.ByteBuffer old_buffer) {
if (old_buffer != null)
BufferChecks.checkDirect(old_buffer);
long function_pointer = GLContext.getCapabilities().ATI_map_object_buffer_glMapObjectBufferATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
if (old_buffer != null)
BufferChecks.checkDirect(old_buffer);
java.nio.ByteBuffer __result = nglMapObjectBufferATI(buffer, result_size, old_buffer, function_pointer);
return __result;
}

View File

@ -22,17 +22,17 @@ public final class ATIVertexArrayObject {
static native void initNativeStubs() throws LWJGLException;
public static void glGetVariantArrayObjectATI(int id, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glGetVariantArrayObjectivATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetVariantArrayObjectivATI(id, pname, params, params.position(), function_pointer);
}
private static native void nglGetVariantArrayObjectivATI(int id, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetVariantArrayObjectATI(int id, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glGetVariantArrayObjectfvATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetVariantArrayObjectfvATI(id, pname, params, params.position(), function_pointer);
}
private static native void nglGetVariantArrayObjectfvATI(int id, int pname, FloatBuffer params, int params_position, long function_pointer);
@ -45,17 +45,17 @@ public final class ATIVertexArrayObject {
private static native void nglVariantArrayObjectATI(int id, int type, int stride, int buffer, int offset, long function_pointer);
public static void glGetArrayObjectATI(int array, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glGetArrayObjectivATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetArrayObjectivATI(array, pname, params, params.position(), function_pointer);
}
private static native void nglGetArrayObjectivATI(int array, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetArrayObjectATI(int array, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glGetArrayObjectfvATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetArrayObjectfvATI(array, pname, params, params.position(), function_pointer);
}
private static native void nglGetArrayObjectfvATI(int array, int pname, FloatBuffer params, int params_position, long function_pointer);
@ -75,43 +75,43 @@ public final class ATIVertexArrayObject {
private static native void nglFreeObjectBufferATI(int buffer, long function_pointer);
public static void glGetObjectBufferATI(int buffer, int pname, IntBuffer params) {
BufferChecks.checkDirect(params);
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glGetObjectBufferivATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(params);
nglGetObjectBufferivATI(buffer, pname, params, params.position(), function_pointer);
}
private static native void nglGetObjectBufferivATI(int buffer, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetObjectBufferATI(int buffer, int pname, FloatBuffer params) {
BufferChecks.checkDirect(params);
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glGetObjectBufferfvATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(params);
nglGetObjectBufferfvATI(buffer, pname, params, params.position(), function_pointer);
}
private static native void nglGetObjectBufferfvATI(int buffer, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glUpdateObjectBufferATI(int buffer, int offset, ByteBuffer pPointer, int preserve) {
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glUpdateObjectBufferATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pPointer);
nglUpdateObjectBufferATI(buffer, offset, (pPointer.remaining()), pPointer, pPointer.position(), preserve, function_pointer);
}
public static void glUpdateObjectBufferATI(int buffer, int offset, FloatBuffer pPointer, int preserve) {
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glUpdateObjectBufferATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pPointer);
nglUpdateObjectBufferATI(buffer, offset, (pPointer.remaining() << 2), pPointer, pPointer.position() << 2, preserve, function_pointer);
}
public static void glUpdateObjectBufferATI(int buffer, int offset, IntBuffer pPointer, int preserve) {
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glUpdateObjectBufferATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pPointer);
nglUpdateObjectBufferATI(buffer, offset, (pPointer.remaining() << 2), pPointer, pPointer.position() << 2, preserve, function_pointer);
}
public static void glUpdateObjectBufferATI(int buffer, int offset, ShortBuffer pPointer, int preserve) {
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glUpdateObjectBufferATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pPointer);
nglUpdateObjectBufferATI(buffer, offset, (pPointer.remaining() << 1), pPointer, pPointer.position() << 1, preserve, function_pointer);
}
private static native void nglUpdateObjectBufferATI(int buffer, int offset, int size, Buffer pPointer, int pPointer_position, int preserve, long function_pointer);
@ -131,30 +131,30 @@ public final class ATIVertexArrayObject {
return __result;
}
public static int glNewObjectBufferATI(ByteBuffer pPointer, int usage) {
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glNewObjectBufferATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pPointer);
int __result = nglNewObjectBufferATI((pPointer.remaining()), pPointer, pPointer.position(), usage, function_pointer);
return __result;
}
public static int glNewObjectBufferATI(FloatBuffer pPointer, int usage) {
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glNewObjectBufferATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pPointer);
int __result = nglNewObjectBufferATI((pPointer.remaining() << 2), pPointer, pPointer.position() << 2, usage, function_pointer);
return __result;
}
public static int glNewObjectBufferATI(IntBuffer pPointer, int usage) {
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glNewObjectBufferATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pPointer);
int __result = nglNewObjectBufferATI((pPointer.remaining() << 2), pPointer, pPointer.position() << 2, usage, function_pointer);
return __result;
}
public static int glNewObjectBufferATI(ShortBuffer pPointer, int usage) {
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glNewObjectBufferATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pPointer);
int __result = nglNewObjectBufferATI((pPointer.remaining() << 1), pPointer, pPointer.position() << 1, usage, function_pointer);
return __result;
}

View File

@ -14,17 +14,17 @@ public final class ATIVertexAttribArrayObject {
static native void initNativeStubs() throws LWJGLException;
public static void glGetVertexAttribArrayObjectATI(int index, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ATI_vertex_attrib_array_object_glGetVertexAttribArrayObjectivATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetVertexAttribArrayObjectivATI(index, pname, params, params.position(), function_pointer);
}
private static native void nglGetVertexAttribArrayObjectivATI(int index, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetVertexAttribArrayObjectATI(int index, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ATI_vertex_attrib_array_object_glGetVertexAttribArrayObjectfvATI_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetVertexAttribArrayObjectfvATI(index, pname, params, params.position(), function_pointer);
}
private static native void nglGetVertexAttribArrayObjectfvATI(int index, int pname, FloatBuffer params, int params_position, long function_pointer);

View File

@ -6,7 +6,7 @@ import org.lwjgl.LWJGLException;
import java.util.Set;
public class ContextCapabilities {
final BufferObjectTracker tracker;
final StateTracker tracker;
public final boolean GL_ARB_color_buffer_float;
public final boolean GL_ARB_depth_texture;
@ -1995,7 +1995,7 @@ public class ContextCapabilities {
ContextCapabilities() throws LWJGLException {
Set supported_extensions = initAllStubs();
tracker = new BufferObjectTracker();
tracker = new StateTracker();
this.GL_ARB_color_buffer_float = supported_extensions.contains("GL_ARB_color_buffer_float");
this.GL_ARB_depth_texture = supported_extensions.contains("GL_ARB_depth_texture");
this.GL_ARB_draw_buffers = supported_extensions.contains("GL_ARB_draw_buffers");

View File

@ -16,31 +16,31 @@ public final class EXTDrawRangeElements {
static native void initNativeStubs() throws LWJGLException;
public static void glDrawRangeElementsEXT(int mode, int start, int end, ByteBuffer pIndices) {
GLBufferChecks.ensureElementVBOdisabled();
BufferChecks.checkDirect(pIndices);
long function_pointer = GLContext.getCapabilities().EXT_draw_range_elements_glDrawRangeElementsEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureElementVBOdisabled();
BufferChecks.checkDirect(pIndices);
nglDrawRangeElementsEXT(mode, start, end, (pIndices.remaining()), GL11.GL_UNSIGNED_BYTE, pIndices, pIndices.position(), function_pointer);
}
public static void glDrawRangeElementsEXT(int mode, int start, int end, IntBuffer pIndices) {
GLBufferChecks.ensureElementVBOdisabled();
BufferChecks.checkDirect(pIndices);
long function_pointer = GLContext.getCapabilities().EXT_draw_range_elements_glDrawRangeElementsEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureElementVBOdisabled();
BufferChecks.checkDirect(pIndices);
nglDrawRangeElementsEXT(mode, start, end, (pIndices.remaining()), GL11.GL_UNSIGNED_INT, pIndices, pIndices.position() << 2, function_pointer);
}
public static void glDrawRangeElementsEXT(int mode, int start, int end, ShortBuffer pIndices) {
GLBufferChecks.ensureElementVBOdisabled();
BufferChecks.checkDirect(pIndices);
long function_pointer = GLContext.getCapabilities().EXT_draw_range_elements_glDrawRangeElementsEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureElementVBOdisabled();
BufferChecks.checkDirect(pIndices);
nglDrawRangeElementsEXT(mode, start, end, (pIndices.remaining()), GL11.GL_UNSIGNED_SHORT, pIndices, pIndices.position() << 1, function_pointer);
}
private static native void nglDrawRangeElementsEXT(int mode, int start, int end, int count, int type, Buffer pIndices, int pIndices_position, long function_pointer);
public static void glDrawRangeElementsEXT(int mode, int start, int end, int count, int type, int pIndices_buffer_offset) {
GLBufferChecks.ensureElementVBOenabled();
long function_pointer = GLContext.getCapabilities().EXT_draw_range_elements_glDrawRangeElementsEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureElementVBOenabled();
nglDrawRangeElementsEXTBO(mode, start, end, count, type, pIndices_buffer_offset, function_pointer);
}
private static native void nglDrawRangeElementsEXTBO(int mode, int start, int end, int count, int type, int pIndices_buffer_offset, long function_pointer);

View File

@ -22,17 +22,18 @@ public final class EXTFogCoord {
static native void initNativeStubs() throws LWJGLException;
public static void glFogCoordPointerEXT(int stride, FloatBuffer data) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().EXT_fog_coord_glFogCoordPointerEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(data);
GLChecks.getReferences().EXT_fog_coord_glFogCoordPointerEXT_data = data;
nglFogCoordPointerEXT(GL11.GL_FLOAT, stride, data, data.position() << 2, function_pointer);
}
private static native void nglFogCoordPointerEXT(int type, int stride, Buffer data, int data_position, long function_pointer);
public static void glFogCoordPointerEXT(int type, int stride, int data_buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().EXT_fog_coord_glFogCoordPointerEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOenabled();
nglFogCoordPointerEXTBO(type, stride, data_buffer_offset, function_pointer);
}
private static native void nglFogCoordPointerEXTBO(int type, int stride, int data_buffer_offset, long function_pointer);

View File

@ -78,9 +78,9 @@ public final class EXTFramebufferObject {
private static native void nglGenerateMipmapEXT(int target, long function_pointer);
public static void glGetFramebufferAttachmentParameterEXT(int target, int attachment, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().EXT_framebuffer_object_glGetFramebufferAttachmentParameterivEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetFramebufferAttachmentParameterivEXT(target, attachment, pname, params, params.position(), function_pointer);
}
private static native void nglGetFramebufferAttachmentParameterivEXT(int target, int attachment, int pname, IntBuffer params, int params_position, long function_pointer);
@ -122,17 +122,17 @@ public final class EXTFramebufferObject {
private static native int nglCheckFramebufferStatusEXT(int target, long function_pointer);
public static void glGenFramebuffersEXT(IntBuffer framebuffers) {
BufferChecks.checkDirect(framebuffers);
long function_pointer = GLContext.getCapabilities().EXT_framebuffer_object_glGenFramebuffersEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(framebuffers);
nglGenFramebuffersEXT((framebuffers.remaining()), framebuffers, framebuffers.position(), function_pointer);
}
private static native void nglGenFramebuffersEXT(int n, IntBuffer framebuffers, int framebuffers_position, long function_pointer);
public static void glDeleteFramebuffersEXT(IntBuffer framebuffers) {
BufferChecks.checkDirect(framebuffers);
long function_pointer = GLContext.getCapabilities().EXT_framebuffer_object_glDeleteFramebuffersEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(framebuffers);
nglDeleteFramebuffersEXT((framebuffers.remaining()), framebuffers, framebuffers.position(), function_pointer);
}
private static native void nglDeleteFramebuffersEXT(int n, IntBuffer framebuffers, int framebuffers_position, long function_pointer);
@ -153,9 +153,9 @@ public final class EXTFramebufferObject {
private static native boolean nglIsFramebufferEXT(int framebuffer, long function_pointer);
public static void glGetRenderbufferParameterEXT(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().EXT_framebuffer_object_glGetRenderbufferParameterivEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetRenderbufferParameterivEXT(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetRenderbufferParameterivEXT(int target, int pname, IntBuffer params, int params_position, long function_pointer);
@ -168,17 +168,17 @@ public final class EXTFramebufferObject {
private static native void nglRenderbufferStorageEXT(int target, int internalformat, int width, int height, long function_pointer);
public static void glGenRenderbuffersEXT(IntBuffer renderbuffers) {
BufferChecks.checkDirect(renderbuffers);
long function_pointer = GLContext.getCapabilities().EXT_framebuffer_object_glGenRenderbuffersEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(renderbuffers);
nglGenRenderbuffersEXT((renderbuffers.remaining()), renderbuffers, renderbuffers.position(), function_pointer);
}
private static native void nglGenRenderbuffersEXT(int n, IntBuffer renderbuffers, int renderbuffers_position, long function_pointer);
public static void glDeleteRenderbuffersEXT(IntBuffer renderbuffers) {
BufferChecks.checkDirect(renderbuffers);
long function_pointer = GLContext.getCapabilities().EXT_framebuffer_object_glDeleteRenderbuffersEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(renderbuffers);
nglDeleteRenderbuffersEXT((renderbuffers.remaining()), renderbuffers, renderbuffers.position(), function_pointer);
}
private static native void nglDeleteRenderbuffersEXT(int n, IntBuffer renderbuffers, int renderbuffers_position, long function_pointer);

View File

@ -14,13 +14,13 @@ public final class EXTMultiDrawArrays {
static native void initNativeStubs() throws LWJGLException;
public static void glMultiDrawArraysEXT(int mode, IntBuffer piFirst, IntBuffer piCount) {
BufferChecks.checkDirect(piFirst);
BufferChecks.checkDirect(piCount);
if (piFirst.remaining() != piCount.remaining()) {
throw new IllegalArgumentException("piFirst.remaining() != piCount.remaining()");
}
long function_pointer = GLContext.getCapabilities().EXT_multi_draw_arrays_glMultiDrawArraysEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(piFirst);
BufferChecks.checkDirect(piCount);
nglMultiDrawArraysEXT(mode, piFirst, piFirst.position(), piCount, piCount.position(), (piFirst.remaining()), function_pointer);
}
private static native void nglMultiDrawArraysEXT(int mode, IntBuffer piFirst, int piFirst_position, IntBuffer piCount, int piCount_position, int primcount, long function_pointer);

View File

@ -29,95 +29,95 @@ public final class EXTPalettedTexture {
static native void initNativeStubs() throws LWJGLException;
public static void glGetColorTableParameterEXT(int target, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glGetColorTableParameterfvEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetColorTableParameterfvEXT(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetColorTableParameterfvEXT(int target, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glGetColorTableParameterEXT(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glGetColorTableParameterivEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetColorTableParameterivEXT(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetColorTableParameterivEXT(int target, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetColorTableEXT(int target, int format, int type, ByteBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glGetColorTableEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglGetColorTableEXT(target, format, type, data, data.position(), function_pointer);
}
public static void glGetColorTableEXT(int target, int format, int type, FloatBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glGetColorTableEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglGetColorTableEXT(target, format, type, data, data.position() << 2, function_pointer);
}
public static void glGetColorTableEXT(int target, int format, int type, IntBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glGetColorTableEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglGetColorTableEXT(target, format, type, data, data.position() << 2, function_pointer);
}
public static void glGetColorTableEXT(int target, int format, int type, ShortBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glGetColorTableEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglGetColorTableEXT(target, format, type, data, data.position() << 1, function_pointer);
}
private static native void nglGetColorTableEXT(int target, int format, int type, Buffer data, int data_position, long function_pointer);
public static void glColorSubTableEXT(int target, int start, int count, int format, int type, ByteBuffer data) {
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, count, 1, 1));
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glColorSubTableEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, count, 1, 1));
nglColorSubTableEXT(target, start, count, format, type, data, data.position(), function_pointer);
}
public static void glColorSubTableEXT(int target, int start, int count, int format, int type, FloatBuffer data) {
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, count, 1, 1));
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glColorSubTableEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, count, 1, 1));
nglColorSubTableEXT(target, start, count, format, type, data, data.position() << 2, function_pointer);
}
public static void glColorSubTableEXT(int target, int start, int count, int format, int type, IntBuffer data) {
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, count, 1, 1));
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glColorSubTableEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, count, 1, 1));
nglColorSubTableEXT(target, start, count, format, type, data, data.position() << 2, function_pointer);
}
public static void glColorSubTableEXT(int target, int start, int count, int format, int type, ShortBuffer data) {
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, count, 1, 1));
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glColorSubTableEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, count, 1, 1));
nglColorSubTableEXT(target, start, count, format, type, data, data.position() << 1, function_pointer);
}
private static native void nglColorSubTableEXT(int target, int start, int count, int format, int type, Buffer data, int data_position, long function_pointer);
public static void glColorTableEXT(int target, int internalFormat, int width, int format, int type, ByteBuffer data) {
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, width, 1, 1));
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glColorTableEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, width, 1, 1));
nglColorTableEXT(target, internalFormat, width, format, type, data, data.position(), function_pointer);
}
public static void glColorTableEXT(int target, int internalFormat, int width, int format, int type, FloatBuffer data) {
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, width, 1, 1));
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glColorTableEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, width, 1, 1));
nglColorTableEXT(target, internalFormat, width, format, type, data, data.position() << 2, function_pointer);
}
public static void glColorTableEXT(int target, int internalFormat, int width, int format, int type, IntBuffer data) {
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, width, 1, 1));
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glColorTableEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, width, 1, 1));
nglColorTableEXT(target, internalFormat, width, format, type, data, data.position() << 2, function_pointer);
}
public static void glColorTableEXT(int target, int internalFormat, int width, int format, int type, ShortBuffer data) {
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, width, 1, 1));
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glColorTableEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, width, 1, 1));
nglColorTableEXT(target, internalFormat, width, format, type, data, data.position() << 1, function_pointer);
}
private static native void nglColorTableEXT(int target, int internalFormat, int width, int format, int type, Buffer data, int data_position, long function_pointer);

View File

@ -18,9 +18,9 @@ public final class EXTPointParameters {
static native void initNativeStubs() throws LWJGLException;
public static void glPointParameterEXT(int pname, FloatBuffer pfParams) {
BufferChecks.checkBuffer(pfParams, 4);
long function_pointer = GLContext.getCapabilities().EXT_point_parameters_glPointParameterfvEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pfParams, 4);
nglPointParameterfvEXT(pname, pfParams, pfParams.position(), function_pointer);
}
private static native void nglPointParameterfvEXT(int pname, FloatBuffer pfParams, int pfParams_position, long function_pointer);

View File

@ -21,24 +21,26 @@ public final class EXTSecondaryColor {
static native void initNativeStubs() throws LWJGLException;
public static void glSecondaryColorPointerEXT(int size, int stride, FloatBuffer pPointer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().EXT_secondary_color_glSecondaryColorPointerEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
GLChecks.getReferences().EXT_secondary_color_glSecondaryColorPointerEXT_pPointer = pPointer;
nglSecondaryColorPointerEXT(size, GL11.GL_FLOAT, stride, pPointer, pPointer.position() << 2, function_pointer);
}
public static void glSecondaryColorPointerEXT(int size, boolean unsigned, int stride, ByteBuffer pPointer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().EXT_secondary_color_glSecondaryColorPointerEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
GLChecks.getReferences().EXT_secondary_color_glSecondaryColorPointerEXT_pPointer = pPointer;
nglSecondaryColorPointerEXT(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pPointer, pPointer.position(), function_pointer);
}
private static native void nglSecondaryColorPointerEXT(int size, int type, int stride, Buffer pPointer, int pPointer_position, long function_pointer);
public static void glSecondaryColorPointerEXT(int size, int type, int stride, int pPointer_buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().EXT_secondary_color_glSecondaryColorPointerEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOenabled();
nglSecondaryColorPointerEXTBO(size, type, stride, pPointer_buffer_offset, function_pointer);
}
private static native void nglSecondaryColorPointerEXTBO(int size, int type, int stride, int pPointer_buffer_offset, long function_pointer);

View File

@ -124,49 +124,49 @@ public final class EXTVertexShader {
static native void initNativeStubs() throws LWJGLException;
public static void glGetLocalConstantFloatEXT(int id, int value, FloatBuffer pbData) {
BufferChecks.checkBuffer(pbData, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glGetLocalConstantFloatvEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pbData, 4);
nglGetLocalConstantFloatvEXT(id, value, pbData, pbData.position(), function_pointer);
}
private static native void nglGetLocalConstantFloatvEXT(int id, int value, FloatBuffer pbData, int pbData_position, long function_pointer);
public static void glGetLocalConstantIntegerEXT(int id, int value, IntBuffer pbData) {
BufferChecks.checkBuffer(pbData, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glGetLocalConstantIntegervEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pbData, 4);
nglGetLocalConstantIntegervEXT(id, value, pbData, pbData.position(), function_pointer);
}
private static native void nglGetLocalConstantIntegervEXT(int id, int value, IntBuffer pbData, int pbData_position, long function_pointer);
public static void glGetLocalConstantBooleanEXT(int id, int value, ByteBuffer pbData) {
BufferChecks.checkBuffer(pbData, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glGetLocalConstantBooleanvEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pbData, 4);
nglGetLocalConstantBooleanvEXT(id, value, pbData, pbData.position(), function_pointer);
}
private static native void nglGetLocalConstantBooleanvEXT(int id, int value, ByteBuffer pbData, int pbData_position, long function_pointer);
public static void glGetInvariantFloatEXT(int id, int value, FloatBuffer pbData) {
BufferChecks.checkBuffer(pbData, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glGetInvariantFloatvEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pbData, 4);
nglGetInvariantFloatvEXT(id, value, pbData, pbData.position(), function_pointer);
}
private static native void nglGetInvariantFloatvEXT(int id, int value, FloatBuffer pbData, int pbData_position, long function_pointer);
public static void glGetInvariantIntegerEXT(int id, int value, IntBuffer pbData) {
BufferChecks.checkBuffer(pbData, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glGetInvariantIntegervEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pbData, 4);
nglGetInvariantIntegervEXT(id, value, pbData, pbData.position(), function_pointer);
}
private static native void nglGetInvariantIntegervEXT(int id, int value, IntBuffer pbData, int pbData_position, long function_pointer);
public static void glGetInvariantBooleanEXT(int id, int value, ByteBuffer pbData) {
BufferChecks.checkBuffer(pbData, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glGetInvariantBooleanvEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pbData, 4);
nglGetInvariantBooleanvEXT(id, value, pbData, pbData.position(), function_pointer);
}
private static native void nglGetInvariantBooleanvEXT(int id, int value, ByteBuffer pbData, int pbData_position, long function_pointer);
@ -180,25 +180,25 @@ public final class EXTVertexShader {
private static native java.nio.ByteBuffer nglGetVariantPointervEXT(int id, int value, int result_size, long function_pointer);
public static void glGetVariantFloatEXT(int id, int value, FloatBuffer pbData) {
BufferChecks.checkBuffer(pbData, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glGetVariantFloatvEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pbData, 4);
nglGetVariantFloatvEXT(id, value, pbData, pbData.position(), function_pointer);
}
private static native void nglGetVariantFloatvEXT(int id, int value, FloatBuffer pbData, int pbData_position, long function_pointer);
public static void glGetVariantIntegerEXT(int id, int value, IntBuffer pbData) {
BufferChecks.checkBuffer(pbData, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glGetVariantIntegervEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pbData, 4);
nglGetVariantIntegervEXT(id, value, pbData, pbData.position(), function_pointer);
}
private static native void nglGetVariantIntegervEXT(int id, int value, IntBuffer pbData, int pbData_position, long function_pointer);
public static void glGetVariantBooleanEXT(int id, int value, ByteBuffer pbData) {
BufferChecks.checkBuffer(pbData, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glGetVariantBooleanvEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pbData, 4);
nglGetVariantBooleanvEXT(id, value, pbData, pbData.position(), function_pointer);
}
private static native void nglGetVariantBooleanvEXT(int id, int value, ByteBuffer pbData, int pbData_position, long function_pointer);
@ -266,146 +266,150 @@ public final class EXTVertexShader {
private static native void nglEnableVariantClientStateEXT(int id, long function_pointer);
public static void glVariantPointerEXT(int id, int stride, FloatBuffer pAddr) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pAddr);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glVariantPointerEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pAddr);
GLChecks.getReferences().EXT_vertex_shader_glVariantPointerEXT_pAddr = pAddr;
nglVariantPointerEXT(id, GL11.GL_FLOAT, stride, pAddr, pAddr.position() << 2, function_pointer);
}
public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ByteBuffer pAddr) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pAddr);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glVariantPointerEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pAddr);
GLChecks.getReferences().EXT_vertex_shader_glVariantPointerEXT_pAddr = pAddr;
nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pAddr, pAddr.position(), function_pointer);
}
public static void glVariantPointerEXT(int id, boolean unsigned, int stride, IntBuffer pAddr) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pAddr);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glVariantPointerEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pAddr);
GLChecks.getReferences().EXT_vertex_shader_glVariantPointerEXT_pAddr = pAddr;
nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, stride, pAddr, pAddr.position() << 2, function_pointer);
}
public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ShortBuffer pAddr) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pAddr);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glVariantPointerEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pAddr);
GLChecks.getReferences().EXT_vertex_shader_glVariantPointerEXT_pAddr = pAddr;
nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, pAddr, pAddr.position() << 1, function_pointer);
}
private static native void nglVariantPointerEXT(int id, int type, int stride, Buffer pAddr, int pAddr_position, long function_pointer);
public static void glVariantPointerEXT(int id, int type, int stride, int pAddr_buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glVariantPointerEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOenabled();
nglVariantPointerEXTBO(id, type, stride, pAddr_buffer_offset, function_pointer);
}
private static native void nglVariantPointerEXTBO(int id, int type, int stride, int pAddr_buffer_offset, long function_pointer);
public static void glVariantuEXT(int id, IntBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glVariantuivEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglVariantuivEXT(id, pAddr, pAddr.position(), function_pointer);
}
private static native void nglVariantuivEXT(int id, IntBuffer pAddr, int pAddr_position, long function_pointer);
public static void glVariantuEXT(int id, ShortBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glVariantusvEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglVariantusvEXT(id, pAddr, pAddr.position(), function_pointer);
}
private static native void nglVariantusvEXT(int id, ShortBuffer pAddr, int pAddr_position, long function_pointer);
public static void glVariantuEXT(int id, ByteBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glVariantubvEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglVariantubvEXT(id, pAddr, pAddr.position(), function_pointer);
}
private static native void nglVariantubvEXT(int id, ByteBuffer pAddr, int pAddr_position, long function_pointer);
public static void glVariantEXT(int id, FloatBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glVariantfvEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglVariantfvEXT(id, pAddr, pAddr.position(), function_pointer);
}
private static native void nglVariantfvEXT(int id, FloatBuffer pAddr, int pAddr_position, long function_pointer);
public static void glVariantEXT(int id, IntBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glVariantivEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglVariantivEXT(id, pAddr, pAddr.position(), function_pointer);
}
private static native void nglVariantivEXT(int id, IntBuffer pAddr, int pAddr_position, long function_pointer);
public static void glVariantEXT(int id, ShortBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glVariantsvEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglVariantsvEXT(id, pAddr, pAddr.position(), function_pointer);
}
private static native void nglVariantsvEXT(int id, ShortBuffer pAddr, int pAddr_position, long function_pointer);
public static void glVariantEXT(int id, ByteBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glVariantbvEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglVariantbvEXT(id, pAddr, pAddr.position(), function_pointer);
}
private static native void nglVariantbvEXT(int id, ByteBuffer pAddr, int pAddr_position, long function_pointer);
public static void glSetLocalConstantEXT(int id, FloatBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glSetLocalConstantEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglSetLocalConstantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position() << 2, function_pointer);
}
public static void glSetLocalConstantEXT(int id, boolean unsigned, ByteBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glSetLocalConstantEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, pAddr, pAddr.position(), function_pointer);
}
public static void glSetLocalConstantEXT(int id, boolean unsigned, IntBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glSetLocalConstantEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, pAddr, pAddr.position() << 2, function_pointer);
}
public static void glSetLocalConstantEXT(int id, boolean unsigned, ShortBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glSetLocalConstantEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position() << 1, function_pointer);
}
private static native void nglSetLocalConstantEXT(int id, int type, Buffer pAddr, int pAddr_position, long function_pointer);
public static void glSetInvariantEXT(int id, FloatBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glSetInvariantEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglSetInvariantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position() << 2, function_pointer);
}
public static void glSetInvariantEXT(int id, boolean unsigned, ByteBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glSetInvariantEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, pAddr, pAddr.position(), function_pointer);
}
public static void glSetInvariantEXT(int id, boolean unsigned, IntBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glSetInvariantEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, pAddr, pAddr.position() << 2, function_pointer);
}
public static void glSetInvariantEXT(int id, boolean unsigned, ShortBuffer pAddr) {
BufferChecks.checkBuffer(pAddr, 4);
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glSetInvariantEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(pAddr, 4);
nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position() << 1, function_pointer);
}
private static native void nglSetInvariantEXT(int id, int type, Buffer pAddr, int pAddr_position, long function_pointer);

View File

@ -27,17 +27,18 @@ public final class EXTVertexWeighting {
static native void initNativeStubs() throws LWJGLException;
public static void glVertexWeightPointerEXT(int size, int stride, FloatBuffer pPointer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().EXT_vertex_weighting_glVertexWeightPointerEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(pPointer);
GLChecks.getReferences().EXT_vertex_weighting_glVertexWeightPointerEXT_pPointer = pPointer;
nglVertexWeightPointerEXT(size, GL11.GL_FLOAT, stride, pPointer, pPointer.position() << 2, function_pointer);
}
private static native void nglVertexWeightPointerEXT(int size, int type, int stride, Buffer pPointer, int pPointer_position, long function_pointer);
public static void glVertexWeightPointerEXT(int size, int type, int stride, int pPointer_buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().EXT_vertex_weighting_glVertexWeightPointerEXT_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOenabled();
nglVertexWeightPointerEXTBO(size, type, stride, pPointer_buffer_offset, function_pointer);
}
private static native void nglVertexWeightPointerEXTBO(int size, int type, int stride, int pPointer_buffer_offset, long function_pointer);

File diff suppressed because it is too large Load Diff

View File

@ -58,109 +58,109 @@ public final class GL12 {
private static native void nglCopyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height, long function_pointer);
public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer pixels) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, depth));
long function_pointer = GLContext.getCapabilities().GL12_glTexSubImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth));
nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position(), function_pointer);
}
public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, FloatBuffer pixels) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, depth));
long function_pointer = GLContext.getCapabilities().GL12_glTexSubImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth));
nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position() << 2, function_pointer);
}
public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, IntBuffer pixels) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, depth));
long function_pointer = GLContext.getCapabilities().GL12_glTexSubImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth));
nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position() << 2, function_pointer);
}
public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ShortBuffer pixels) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, depth));
long function_pointer = GLContext.getCapabilities().GL12_glTexSubImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth));
nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position() << 1, function_pointer);
}
private static native void nglTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, Buffer pixels, int pixels_position, long function_pointer);
public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, int pixels_buffer_offset) {
GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL12_glTexSubImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOenabled();
nglTexSubImage3DBO(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_buffer_offset, function_pointer);
}
private static native void nglTexSubImage3DBO(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, int pixels_buffer_offset, long function_pointer);
public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ByteBuffer pixels) {
GLBufferChecks.ensureUnpackPBOdisabled();
if (pixels != null)
BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth, border));
long function_pointer = GLContext.getCapabilities().GL12_glTexImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
if (pixels != null)
BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth, border));
nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels != null ? pixels.position() : 0, function_pointer);
}
public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, FloatBuffer pixels) {
GLBufferChecks.ensureUnpackPBOdisabled();
if (pixels != null)
BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth, border));
long function_pointer = GLContext.getCapabilities().GL12_glTexImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
if (pixels != null)
BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth, border));
nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0, function_pointer);
}
public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, IntBuffer pixels) {
GLBufferChecks.ensureUnpackPBOdisabled();
if (pixels != null)
BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth, border));
long function_pointer = GLContext.getCapabilities().GL12_glTexImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
if (pixels != null)
BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth, border));
nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0, function_pointer);
}
public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ShortBuffer pixels) {
GLBufferChecks.ensureUnpackPBOdisabled();
if (pixels != null)
BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth, border));
long function_pointer = GLContext.getCapabilities().GL12_glTexImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
if (pixels != null)
BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth, border));
nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels != null ? pixels.position() << 1 : 0, function_pointer);
}
private static native void nglTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, Buffer pixels, int pixels_position, long function_pointer);
public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, int pixels_buffer_offset) {
GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL12_glTexImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOenabled();
nglTexImage3DBO(target, level, internalFormat, width, height, depth, border, format, type, pixels_buffer_offset, function_pointer);
}
private static native void nglTexImage3DBO(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, int pixels_buffer_offset, long function_pointer);
public static void glDrawRangeElements(int mode, int start, int end, ByteBuffer indices) {
GLBufferChecks.ensureElementVBOdisabled();
BufferChecks.checkDirect(indices);
long function_pointer = GLContext.getCapabilities().GL12_glDrawRangeElements_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureElementVBOdisabled();
BufferChecks.checkDirect(indices);
nglDrawRangeElements(mode, start, end, (indices.remaining()), GL11.GL_UNSIGNED_BYTE, indices, indices.position(), function_pointer);
}
public static void glDrawRangeElements(int mode, int start, int end, IntBuffer indices) {
GLBufferChecks.ensureElementVBOdisabled();
BufferChecks.checkDirect(indices);
long function_pointer = GLContext.getCapabilities().GL12_glDrawRangeElements_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureElementVBOdisabled();
BufferChecks.checkDirect(indices);
nglDrawRangeElements(mode, start, end, (indices.remaining()), GL11.GL_UNSIGNED_INT, indices, indices.position() << 2, function_pointer);
}
public static void glDrawRangeElements(int mode, int start, int end, ShortBuffer indices) {
GLBufferChecks.ensureElementVBOdisabled();
BufferChecks.checkDirect(indices);
long function_pointer = GLContext.getCapabilities().GL12_glDrawRangeElements_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureElementVBOdisabled();
BufferChecks.checkDirect(indices);
nglDrawRangeElements(mode, start, end, (indices.remaining()), GL11.GL_UNSIGNED_SHORT, indices, indices.position() << 1, function_pointer);
}
private static native void nglDrawRangeElements(int mode, int start, int end, int count, int type, Buffer indices, int indices_position, long function_pointer);
public static void glDrawRangeElements(int mode, int start, int end, int count, int type, int indices_buffer_offset) {
GLBufferChecks.ensureElementVBOenabled();
long function_pointer = GLContext.getCapabilities().GL12_glDrawRangeElements_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureElementVBOenabled();
nglDrawRangeElementsBO(mode, start, end, count, type, indices_buffer_offset, function_pointer);
}
private static native void nglDrawRangeElementsBO(int mode, int start, int end, int count, int type, int indices_buffer_offset, long function_pointer);

View File

@ -117,17 +117,17 @@ public final class GL13 {
private static native void nglSampleCoverage(float value, boolean invert, long function_pointer);
public static void glMultTransposeMatrix(FloatBuffer m) {
BufferChecks.checkBuffer(m, 16);
long function_pointer = GLContext.getCapabilities().GL13_glMultTransposeMatrixf_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(m, 16);
nglMultTransposeMatrixf(m, m.position(), function_pointer);
}
private static native void nglMultTransposeMatrixf(FloatBuffer m, int m_position, long function_pointer);
public static void glLoadTransposeMatrix(FloatBuffer m) {
BufferChecks.checkBuffer(m, 16);
long function_pointer = GLContext.getCapabilities().GL13_glLoadTransposeMatrixf_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(m, 16);
nglLoadTransposeMatrixf(m, m.position(), function_pointer);
}
private static native void nglLoadTransposeMatrixf(FloatBuffer m, int m_position, long function_pointer);
@ -161,253 +161,253 @@ public final class GL13 {
private static native void nglMultiTexCoord1f(int target, float s, long function_pointer);
public static void glGetCompressedTexImage(int target, int lod, ByteBuffer img) {
GLBufferChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(img);
long function_pointer = GLContext.getCapabilities().GL13_glGetCompressedTexImage_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(img);
nglGetCompressedTexImage(target, lod, img, img.position(), function_pointer);
}
public static void glGetCompressedTexImage(int target, int lod, IntBuffer img) {
GLBufferChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(img);
long function_pointer = GLContext.getCapabilities().GL13_glGetCompressedTexImage_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(img);
nglGetCompressedTexImage(target, lod, img, img.position() << 2, function_pointer);
}
public static void glGetCompressedTexImage(int target, int lod, ShortBuffer img) {
GLBufferChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(img);
long function_pointer = GLContext.getCapabilities().GL13_glGetCompressedTexImage_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(img);
nglGetCompressedTexImage(target, lod, img, img.position() << 1, function_pointer);
}
private static native void nglGetCompressedTexImage(int target, int lod, Buffer img, int img_position, long function_pointer);
public static void glGetCompressedTexImage(int target, int lod, int img_buffer_offset) {
GLBufferChecks.ensurePackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL13_glGetCompressedTexImage_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensurePackPBOenabled();
nglGetCompressedTexImageBO(target, lod, img_buffer_offset, function_pointer);
}
private static native void nglGetCompressedTexImageBO(int target, int lod, int img_buffer_offset, long function_pointer);
public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ByteBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data, data.position(), function_pointer);
}
public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, FloatBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data, data.position() << 2, function_pointer);
}
public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, IntBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data, data.position() << 2, function_pointer);
}
public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ShortBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data, data.position() << 1, function_pointer);
}
private static native void nglCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, Buffer data, int data_position, long function_pointer);
public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, int data_buffer_offset) {
GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOenabled();
nglCompressedTexSubImage3DBO(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data_buffer_offset, function_pointer);
}
private static native void nglCompressedTexSubImage3DBO(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, int data_buffer_offset, long function_pointer);
public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ByteBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data, data.position(), function_pointer);
}
public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, FloatBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data, data.position() << 2, function_pointer);
}
public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, IntBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data, data.position() << 2, function_pointer);
}
public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ShortBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data, data.position() << 1, function_pointer);
}
private static native void nglCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, Buffer data, int data_position, long function_pointer);
public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, int data_buffer_offset) {
GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOenabled();
nglCompressedTexSubImage2DBO(target, level, xoffset, yoffset, width, height, format, imageSize, data_buffer_offset, function_pointer);
}
private static native void nglCompressedTexSubImage2DBO(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, int data_buffer_offset, long function_pointer);
public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, ByteBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data, data.position(), function_pointer);
}
public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, FloatBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data, data.position() << 2, function_pointer);
}
public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, IntBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data, data.position() << 2, function_pointer);
}
public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, ShortBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data, data.position() << 1, function_pointer);
}
private static native void nglCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, Buffer data, int data_position, long function_pointer);
public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, int data_buffer_offset) {
GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexSubImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOenabled();
nglCompressedTexSubImage1DBO(target, level, xoffset, width, format, imageSize, data_buffer_offset, function_pointer);
}
private static native void nglCompressedTexSubImage1DBO(int target, int level, int xoffset, int width, int format, int imageSize, int data_buffer_offset, long function_pointer);
public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ByteBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data, data.position(), function_pointer);
}
public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, FloatBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data, data.position() << 2, function_pointer);
}
public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, IntBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data, data.position() << 2, function_pointer);
}
public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ShortBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data, data.position() << 1, function_pointer);
}
private static native void nglCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, Buffer data, int data_position, long function_pointer);
public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, int data_buffer_offset) {
GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage3D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOenabled();
nglCompressedTexImage3DBO(target, level, internalformat, width, height, depth, border, imageSize, data_buffer_offset, function_pointer);
}
private static native void nglCompressedTexImage3DBO(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, int data_buffer_offset, long function_pointer);
public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, ByteBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data, data.position(), function_pointer);
}
public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, FloatBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data, data.position() << 2, function_pointer);
}
public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, IntBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data, data.position() << 2, function_pointer);
}
public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, ShortBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data, data.position() << 1, function_pointer);
}
private static native void nglCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, Buffer data, int data_position, long function_pointer);
public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, int data_buffer_offset) {
GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOenabled();
nglCompressedTexImage2DBO(target, level, internalformat, width, height, border, imageSize, data_buffer_offset, function_pointer);
}
private static native void nglCompressedTexImage2DBO(int target, int level, int internalformat, int width, int height, int border, int imageSize, int data_buffer_offset, long function_pointer);
public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, ByteBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data, data.position(), function_pointer);
}
public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, FloatBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data, data.position() << 2, function_pointer);
}
public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, IntBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data, data.position() << 2, function_pointer);
}
public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, ShortBuffer data) {
GLBufferChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOdisabled();
BufferChecks.checkDirect(data);
nglCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data, data.position() << 1, function_pointer);
}
private static native void nglCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, Buffer data, int data_position, long function_pointer);
public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, int data_buffer_offset) {
GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL13_glCompressedTexImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureUnpackPBOenabled();
nglCompressedTexImage1DBO(target, level, internalformat, width, border, imageSize, data_buffer_offset, function_pointer);
}
private static native void nglCompressedTexImage1DBO(int target, int level, int internalformat, int width, int border, int imageSize, int data_buffer_offset, long function_pointer);

View File

@ -88,24 +88,24 @@ public final class GL14 {
private static native void nglBlendFuncSeparate(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha, long function_pointer);
public static void glSecondaryColorPointer(int size, int stride, FloatBuffer data) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL14_glSecondaryColorPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(data);
nglSecondaryColorPointer(size, GL11.GL_FLOAT, stride, data, data.position() << 2, function_pointer);
}
public static void glSecondaryColorPointer(int size, boolean unsigned, int stride, ByteBuffer data) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL14_glSecondaryColorPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(data);
nglSecondaryColorPointer(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, data, data.position(), function_pointer);
}
private static native void nglSecondaryColorPointer(int size, int type, int stride, Buffer data, int data_position, long function_pointer);
public static void glSecondaryColorPointer(int size, int type, int stride, int data_buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().GL14_glSecondaryColorPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOenabled();
nglSecondaryColorPointerBO(size, type, stride, data_buffer_offset, function_pointer);
}
private static native void nglSecondaryColorPointerBO(int size, int type, int stride, int data_buffer_offset, long function_pointer);
@ -132,17 +132,17 @@ public final class GL14 {
private static native void nglSecondaryColor3b(byte red, byte green, byte blue, long function_pointer);
public static void glPointParameter(int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL14_glPointParameterfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglPointParameterfv(pname, params, params.position(), function_pointer);
}
private static native void nglPointParameterfv(int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glPointParameter(int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL14_glPointParameteriv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglPointParameteriv(pname, params, params.position(), function_pointer);
}
private static native void nglPointParameteriv(int pname, IntBuffer params, int params_position, long function_pointer);
@ -162,29 +162,30 @@ public final class GL14 {
private static native void nglPointParameteri(int pname, int param, long function_pointer);
public static void glMultiDrawArrays(int mode, IntBuffer piFirst, IntBuffer piCount) {
BufferChecks.checkDirect(piFirst);
BufferChecks.checkDirect(piCount);
if (piFirst.remaining() != piCount.remaining()) {
throw new IllegalArgumentException("piFirst.remaining() != piCount.remaining()");
}
long function_pointer = GLContext.getCapabilities().GL14_glMultiDrawArrays_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(piFirst);
BufferChecks.checkDirect(piCount);
nglMultiDrawArrays(mode, piFirst, piFirst.position(), piCount, piCount.position(), (piFirst.remaining()), function_pointer);
}
private static native void nglMultiDrawArrays(int mode, IntBuffer piFirst, int piFirst_position, IntBuffer piCount, int piCount_position, int primcount, long function_pointer);
public static void glFogCoordPointer(int stride, FloatBuffer data) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL14_glFogCoordPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(data);
GLChecks.getReferences().GL14_glFogCoordPointer_data = data;
nglFogCoordPointer(GL11.GL_FLOAT, stride, data, data.position() << 2, function_pointer);
}
private static native void nglFogCoordPointer(int type, int stride, Buffer data, int data_position, long function_pointer);
public static void glFogCoordPointer(int type, int stride, int data_buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().GL14_glFogCoordPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOenabled();
nglFogCoordPointerBO(type, stride, data_buffer_offset, function_pointer);
}
private static native void nglFogCoordPointerBO(int type, int stride, int data_buffer_offset, long function_pointer);

View File

@ -50,25 +50,25 @@ public final class GL15 {
static native void initNativeStubs() throws LWJGLException;
public static void glGetQueryObjectu(int id, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL15_glGetQueryObjectuiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetQueryObjectuiv(id, pname, params, params.position(), function_pointer);
}
private static native void nglGetQueryObjectuiv(int id, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetQueryObject(int id, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL15_glGetQueryObjectiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetQueryObjectiv(id, pname, params, params.position(), function_pointer);
}
private static native void nglGetQueryObjectiv(int id, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetQuery(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL15_glGetQueryiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetQueryiv(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetQueryiv(int target, int pname, IntBuffer params, int params_position, long function_pointer);
@ -96,17 +96,17 @@ public final class GL15 {
private static native boolean nglIsQuery(int id, long function_pointer);
public static void glDeleteQueries(IntBuffer ids) {
BufferChecks.checkDirect(ids);
long function_pointer = GLContext.getCapabilities().GL15_glDeleteQueries_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(ids);
nglDeleteQueries((ids.remaining()), ids, ids.position(), function_pointer);
}
private static native void nglDeleteQueries(int n, IntBuffer ids, int ids_position, long function_pointer);
public static void glGenQueries(IntBuffer ids) {
BufferChecks.checkDirect(ids);
long function_pointer = GLContext.getCapabilities().GL15_glGenQueries_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(ids);
nglGenQueries((ids.remaining()), ids, ids.position(), function_pointer);
}
private static native void nglGenQueries(int n, IntBuffer ids, int ids_position, long function_pointer);
@ -120,9 +120,9 @@ public final class GL15 {
private static native java.nio.ByteBuffer nglGetBufferPointerv(int target, int pname, int result_size, long function_pointer);
public static void glGetBufferParameter(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL15_glGetBufferParameteriv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetBufferParameteriv(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetBufferParameteriv(int target, int pname, IntBuffer params, int params_position, long function_pointer);
@ -149,63 +149,63 @@ public final class GL15 {
* @return A ByteBuffer representing the mapped buffer memory.
*/
public static java.nio.ByteBuffer glMapBuffer(int target, int access, int result_size, java.nio.ByteBuffer old_buffer) {
if (old_buffer != null)
BufferChecks.checkDirect(old_buffer);
long function_pointer = GLContext.getCapabilities().GL15_glMapBuffer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
if (old_buffer != null)
BufferChecks.checkDirect(old_buffer);
java.nio.ByteBuffer __result = nglMapBuffer(target, access, result_size, old_buffer, function_pointer);
return __result;
}
private static native java.nio.ByteBuffer nglMapBuffer(int target, int access, int result_size, java.nio.ByteBuffer old_buffer, long function_pointer);
public static void glGetBufferSubData(int target, int offset, ByteBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL15_glGetBufferSubData_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglGetBufferSubData(target, offset, (data.remaining()), data, data.position(), function_pointer);
}
public static void glGetBufferSubData(int target, int offset, FloatBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL15_glGetBufferSubData_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglGetBufferSubData(target, offset, (data.remaining() << 2), data, data.position() << 2, function_pointer);
}
public static void glGetBufferSubData(int target, int offset, IntBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL15_glGetBufferSubData_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglGetBufferSubData(target, offset, (data.remaining() << 2), data, data.position() << 2, function_pointer);
}
public static void glGetBufferSubData(int target, int offset, ShortBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL15_glGetBufferSubData_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglGetBufferSubData(target, offset, (data.remaining() << 1), data, data.position() << 1, function_pointer);
}
private static native void nglGetBufferSubData(int target, int offset, int size, Buffer data, int data_position, long function_pointer);
public static void glBufferSubData(int target, int offset, ByteBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL15_glBufferSubData_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglBufferSubData(target, offset, (data.remaining()), data, data.position(), function_pointer);
}
public static void glBufferSubData(int target, int offset, FloatBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL15_glBufferSubData_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglBufferSubData(target, offset, (data.remaining() << 2), data, data.position() << 2, function_pointer);
}
public static void glBufferSubData(int target, int offset, IntBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL15_glBufferSubData_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglBufferSubData(target, offset, (data.remaining() << 2), data, data.position() << 2, function_pointer);
}
public static void glBufferSubData(int target, int offset, ShortBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL15_glBufferSubData_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglBufferSubData(target, offset, (data.remaining() << 1), data, data.position() << 1, function_pointer);
}
private static native void nglBufferSubData(int target, int offset, int size, Buffer data, int data_position, long function_pointer);
@ -216,27 +216,27 @@ public final class GL15 {
nglBufferData(target, size, null, 0, usage, function_pointer);
}
public static void glBufferData(int target, ByteBuffer data, int usage) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL15_glBufferData_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglBufferData(target, (data.remaining()), data, data.position(), usage, function_pointer);
}
public static void glBufferData(int target, FloatBuffer data, int usage) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL15_glBufferData_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglBufferData(target, (data.remaining() << 2), data, data.position() << 2, usage, function_pointer);
}
public static void glBufferData(int target, IntBuffer data, int usage) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL15_glBufferData_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglBufferData(target, (data.remaining() << 2), data, data.position() << 2, usage, function_pointer);
}
public static void glBufferData(int target, ShortBuffer data, int usage) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().GL15_glBufferData_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglBufferData(target, (data.remaining() << 1), data, data.position() << 1, usage, function_pointer);
}
private static native void nglBufferData(int target, int size, Buffer data, int data_position, int usage, long function_pointer);
@ -250,24 +250,24 @@ public final class GL15 {
private static native boolean nglIsBuffer(int buffer, long function_pointer);
public static void glGenBuffers(IntBuffer buffers) {
BufferChecks.checkDirect(buffers);
long function_pointer = GLContext.getCapabilities().GL15_glGenBuffers_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(buffers);
nglGenBuffers((buffers.remaining()), buffers, buffers.position(), function_pointer);
}
private static native void nglGenBuffers(int n, IntBuffer buffers, int buffers_position, long function_pointer);
public static void glDeleteBuffers(IntBuffer buffers) {
BufferChecks.checkDirect(buffers);
BufferObjectTracker.deleteBuffers(buffers);
StateTracker.deleteBuffers(buffers);
long function_pointer = GLContext.getCapabilities().GL15_glDeleteBuffers_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(buffers);
nglDeleteBuffers((buffers.remaining()), buffers, buffers.position(), function_pointer);
}
private static native void nglDeleteBuffers(int n, IntBuffer buffers, int buffers_position, long function_pointer);
public static void glBindBuffer(int target, int buffer) {
BufferObjectTracker.bindBuffer(target, buffer);
StateTracker.bindBuffer(target, buffer);
long function_pointer = GLContext.getCapabilities().GL15_glBindBuffer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglBindBuffer(target, buffer, function_pointer);

View File

@ -127,40 +127,40 @@ public final class GL20 {
private static native void nglStencilOpSeparate(int face, int sfail, int dpfail, int dppass, long function_pointer);
public static void glDrawBuffers(IntBuffer buffers) {
BufferChecks.checkDirect(buffers);
long function_pointer = GLContext.getCapabilities().GL20_glDrawBuffers_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(buffers);
nglDrawBuffers((buffers.remaining()), buffers, buffers.position(), function_pointer);
}
private static native void nglDrawBuffers(int size, IntBuffer buffers, int buffers_position, long function_pointer);
public static int glGetAttribLocation(int program, ByteBuffer name) {
BufferChecks.checkDirect(name);
BufferChecks.checkNullTerminated(name);
long function_pointer = GLContext.getCapabilities().GL20_glGetAttribLocation_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(name);
BufferChecks.checkNullTerminated(name);
int __result = nglGetAttribLocation(program, name, name.position(), function_pointer);
return __result;
}
private static native int nglGetAttribLocation(int program, ByteBuffer name, int name_position, long function_pointer);
public static void glGetActiveAttrib(int program, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) {
long function_pointer = GLContext.getCapabilities().GL20_glGetActiveAttrib_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
if (length != null)
BufferChecks.checkBuffer(length, 1);
BufferChecks.checkBuffer(size, 1);
BufferChecks.checkBuffer(type, 1);
BufferChecks.checkDirect(name);
long function_pointer = GLContext.getCapabilities().GL20_glGetActiveAttrib_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglGetActiveAttrib(program, index, (name.remaining()), length, length != null ? length.position() : 0, size, size.position(), type, type.position(), name, name.position(), function_pointer);
}
private static native void nglGetActiveAttrib(int program, int index, int maxLength, IntBuffer length, int length_position, IntBuffer size, int size_position, IntBuffer type, int type_position, ByteBuffer name, int name_position, long function_pointer);
public static void glBindAttribLocation(int program, int index, ByteBuffer name) {
BufferChecks.checkDirect(name);
BufferChecks.checkNullTerminated(name);
long function_pointer = GLContext.getCapabilities().GL20_glBindAttribLocation_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(name);
BufferChecks.checkNullTerminated(name);
nglBindAttribLocation(program, index, name, name.position(), function_pointer);
}
private static native void nglBindAttribLocation(int program, int index, ByteBuffer name, int name_position, long function_pointer);
@ -174,17 +174,17 @@ public final class GL20 {
private static native java.nio.ByteBuffer nglGetVertexAttribPointerv(int index, int pname, int result_size, long function_pointer);
public static void glGetVertexAttrib(int index, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL20_glGetVertexAttribiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetVertexAttribiv(index, pname, params, params.position(), function_pointer);
}
private static native void nglGetVertexAttribiv(int index, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetVertexAttrib(int index, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL20_glGetVertexAttribfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetVertexAttribfv(index, pname, params, params.position(), function_pointer);
}
private static native void nglGetVertexAttribfv(int index, int pname, FloatBuffer params, int params_position, long function_pointer);
@ -204,38 +204,42 @@ public final class GL20 {
private static native void nglEnableVertexAttribArray(int index, long function_pointer);
public static void glVertexAttribPointer(int index, int size, boolean normalized, int stride, FloatBuffer buffer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
long function_pointer = GLContext.getCapabilities().GL20_glVertexAttribPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
GLChecks.getReferences().GL20_glVertexAttribPointer_buffer = buffer;
nglVertexAttribPointer(index, size, GL11.GL_FLOAT, normalized, stride, buffer, buffer.position() << 2, function_pointer);
}
public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
long function_pointer = GLContext.getCapabilities().GL20_glVertexAttribPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
GLChecks.getReferences().GL20_glVertexAttribPointer_buffer = buffer;
nglVertexAttribPointer(index, size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, normalized, stride, buffer, buffer.position(), function_pointer);
}
public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, IntBuffer buffer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
long function_pointer = GLContext.getCapabilities().GL20_glVertexAttribPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
GLChecks.getReferences().GL20_glVertexAttribPointer_buffer = buffer;
nglVertexAttribPointer(index, size, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, normalized, stride, buffer, buffer.position() << 2, function_pointer);
}
public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, ShortBuffer buffer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
long function_pointer = GLContext.getCapabilities().GL20_glVertexAttribPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
GLChecks.getReferences().GL20_glVertexAttribPointer_buffer = buffer;
nglVertexAttribPointer(index, size, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, normalized, stride, buffer, buffer.position() << 1, function_pointer);
}
private static native void nglVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, Buffer buffer, int buffer_position, long function_pointer);
public static void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, int buffer_buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().GL20_glVertexAttribPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOenabled();
nglVertexAttribPointerBO(index, size, type, normalized, stride, buffer_buffer_offset, function_pointer);
}
private static native void nglVertexAttribPointerBO(int index, int size, int type, boolean normalized, int stride, int buffer_buffer_offset, long function_pointer);
@ -304,39 +308,39 @@ public final class GL20 {
private static native void nglVertexAttrib1s(int index, short x, long function_pointer);
public static void glGetShaderSource(int shader, IntBuffer length, ByteBuffer source) {
long function_pointer = GLContext.getCapabilities().GL20_glGetShaderSource_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
if (length != null)
BufferChecks.checkBuffer(length, 1);
BufferChecks.checkDirect(source);
long function_pointer = GLContext.getCapabilities().GL20_glGetShaderSource_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglGetShaderSource(shader, (source.remaining()), length, length != null ? length.position() : 0, source, source.position(), function_pointer);
}
private static native void nglGetShaderSource(int shader, int maxLength, IntBuffer length, int length_position, ByteBuffer source, int source_position, long function_pointer);
public static void glGetUniform(int program, int location, IntBuffer params) {
BufferChecks.checkDirect(params);
long function_pointer = GLContext.getCapabilities().GL20_glGetUniformiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(params);
nglGetUniformiv(program, location, params, params.position(), function_pointer);
}
private static native void nglGetUniformiv(int program, int location, IntBuffer params, int params_position, long function_pointer);
public static void glGetUniform(int program, int location, FloatBuffer params) {
BufferChecks.checkDirect(params);
long function_pointer = GLContext.getCapabilities().GL20_glGetUniformfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(params);
nglGetUniformfv(program, location, params, params.position(), function_pointer);
}
private static native void nglGetUniformfv(int program, int location, FloatBuffer params, int params_position, long function_pointer);
public static void glGetActiveUniform(int program, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) {
long function_pointer = GLContext.getCapabilities().GL20_glGetActiveUniform_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
if (length != null)
BufferChecks.checkBuffer(length, 1);
BufferChecks.checkDirect(size);
BufferChecks.checkDirect(type);
BufferChecks.checkDirect(name);
long function_pointer = GLContext.getCapabilities().GL20_glGetActiveUniform_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglGetActiveUniform(program, index, (name.remaining()), length, length != null ? length.position() : 0, size, size.position(), type, type.position(), name, name.position(), function_pointer);
}
private static native void nglGetActiveUniform(int program, int index, int maxLength, IntBuffer length, int length_position, IntBuffer size, int size_position, IntBuffer type, int type_position, ByteBuffer name, int name_position, long function_pointer);
@ -349,145 +353,145 @@ public final class GL20 {
* @return
*/
public static int glGetUniformLocation(int program, ByteBuffer name) {
BufferChecks.checkBuffer(name, 1);
BufferChecks.checkNullTerminated(name);
long function_pointer = GLContext.getCapabilities().GL20_glGetUniformLocation_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(name, 1);
BufferChecks.checkNullTerminated(name);
int __result = nglGetUniformLocation(program, name, name.position(), function_pointer);
return __result;
}
private static native int nglGetUniformLocation(int program, ByteBuffer name, int name_position, long function_pointer);
public static void glGetAttachedShaders(int program, IntBuffer count, IntBuffer shaders) {
long function_pointer = GLContext.getCapabilities().GL20_glGetAttachedShaders_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
if (count != null)
BufferChecks.checkBuffer(count, 1);
BufferChecks.checkDirect(shaders);
long function_pointer = GLContext.getCapabilities().GL20_glGetAttachedShaders_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglGetAttachedShaders(program, (shaders.remaining()), count, count != null ? count.position() : 0, shaders, shaders.position(), function_pointer);
}
private static native void nglGetAttachedShaders(int program, int maxCount, IntBuffer count, int count_position, IntBuffer shaders, int shaders_position, long function_pointer);
public static void glGetProgramInfoLog(int program, IntBuffer length, ByteBuffer infoLog) {
long function_pointer = GLContext.getCapabilities().GL20_glGetProgramInfoLog_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
if (length != null)
BufferChecks.checkBuffer(length, 1);
BufferChecks.checkDirect(infoLog);
long function_pointer = GLContext.getCapabilities().GL20_glGetProgramInfoLog_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglGetProgramInfoLog(program, (infoLog.remaining()), length, length != null ? length.position() : 0, infoLog, infoLog.position(), function_pointer);
}
private static native void nglGetProgramInfoLog(int program, int maxLength, IntBuffer length, int length_position, ByteBuffer infoLog, int infoLog_position, long function_pointer);
public static void glGetShaderInfoLog(int shader, IntBuffer length, ByteBuffer infoLog) {
long function_pointer = GLContext.getCapabilities().GL20_glGetShaderInfoLog_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
if (length != null)
BufferChecks.checkBuffer(length, 1);
BufferChecks.checkDirect(infoLog);
long function_pointer = GLContext.getCapabilities().GL20_glGetShaderInfoLog_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglGetShaderInfoLog(shader, (infoLog.remaining()), length, length != null ? length.position() : 0, infoLog, infoLog.position(), function_pointer);
}
private static native void nglGetShaderInfoLog(int shader, int maxLength, IntBuffer length, int length_position, ByteBuffer infoLog, int infoLog_position, long function_pointer);
public static void glGetProgram(int program, int pname, IntBuffer params) {
BufferChecks.checkDirect(params);
long function_pointer = GLContext.getCapabilities().GL20_glGetProgramiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(params);
nglGetProgramiv(program, pname, params, params.position(), function_pointer);
}
private static native void nglGetProgramiv(int program, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetShader(int shader, int pname, IntBuffer params) {
BufferChecks.checkDirect(params);
long function_pointer = GLContext.getCapabilities().GL20_glGetShaderiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(params);
nglGetShaderiv(shader, pname, params, params.position(), function_pointer);
}
private static native void nglGetShaderiv(int shader, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glUniformMatrix4(int location, boolean transpose, FloatBuffer matrices) {
BufferChecks.checkDirect(matrices);
long function_pointer = GLContext.getCapabilities().GL20_glUniformMatrix4fv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(matrices);
nglUniformMatrix4fv(location, (matrices.remaining()) >> 4, transpose, matrices, matrices.position(), function_pointer);
}
private static native void nglUniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer matrices, int matrices_position, long function_pointer);
public static void glUniformMatrix3(int location, boolean transpose, FloatBuffer matrices) {
BufferChecks.checkDirect(matrices);
long function_pointer = GLContext.getCapabilities().GL20_glUniformMatrix3fv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(matrices);
nglUniformMatrix3fv(location, (matrices.remaining()) / (3 * 3), transpose, matrices, matrices.position(), function_pointer);
}
private static native void nglUniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer matrices, int matrices_position, long function_pointer);
public static void glUniformMatrix2(int location, boolean transpose, FloatBuffer matrices) {
BufferChecks.checkDirect(matrices);
long function_pointer = GLContext.getCapabilities().GL20_glUniformMatrix2fv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(matrices);
nglUniformMatrix2fv(location, (matrices.remaining()) >> 2, transpose, matrices, matrices.position(), function_pointer);
}
private static native void nglUniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer matrices, int matrices_position, long function_pointer);
public static void glUniform4(int location, IntBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().GL20_glUniform4iv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform4iv(location, (values.remaining()) >> 2, values, values.position(), function_pointer);
}
private static native void nglUniform4iv(int location, int count, IntBuffer values, int values_position, long function_pointer);
public static void glUniform3(int location, IntBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().GL20_glUniform3iv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform3iv(location, (values.remaining()) / 3, values, values.position(), function_pointer);
}
private static native void nglUniform3iv(int location, int count, IntBuffer values, int values_position, long function_pointer);
public static void glUniform2(int location, IntBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().GL20_glUniform2iv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform2iv(location, (values.remaining()) >> 1, values, values.position(), function_pointer);
}
private static native void nglUniform2iv(int location, int count, IntBuffer values, int values_position, long function_pointer);
public static void glUniform1(int location, IntBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().GL20_glUniform1iv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform1iv(location, (values.remaining()), values, values.position(), function_pointer);
}
private static native void nglUniform1iv(int location, int count, IntBuffer values, int values_position, long function_pointer);
public static void glUniform4(int location, FloatBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().GL20_glUniform4fv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform4fv(location, (values.remaining()) >> 2, values, values.position(), function_pointer);
}
private static native void nglUniform4fv(int location, int count, FloatBuffer values, int values_position, long function_pointer);
public static void glUniform3(int location, FloatBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().GL20_glUniform3fv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform3fv(location, (values.remaining()) / 3, values, values.position(), function_pointer);
}
private static native void nglUniform3fv(int location, int count, FloatBuffer values, int values_position, long function_pointer);
public static void glUniform2(int location, FloatBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().GL20_glUniform2fv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform2fv(location, (values.remaining()) >> 1, values, values.position(), function_pointer);
}
private static native void nglUniform2fv(int location, int count, FloatBuffer values, int values_position, long function_pointer);
public static void glUniform1(int location, FloatBuffer values) {
BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().GL20_glUniform1fv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(values);
nglUniform1fv(location, (values.remaining()), values, values.position(), function_pointer);
}
private static native void nglUniform1fv(int location, int count, FloatBuffer values, int values_position, long function_pointer);
@ -644,9 +648,9 @@ public final class GL20 {
* @param string
*/
public static void glShaderSource(int shader, ByteBuffer string) {
BufferChecks.checkDirect(string);
long function_pointer = GLContext.getCapabilities().GL20_glShaderSource_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(string);
nglShaderSource(shader, 1, string, string.position(), (string.remaining()), function_pointer);
}
private static native void nglShaderSource(int shader, int count, ByteBuffer string, int string_position, int length, long function_pointer);

View File

@ -46,57 +46,61 @@ import java.nio.*;
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
*/
class GLBufferChecks {
class GLChecks {
/** Static methods only! */
private GLBufferChecks() {
private GLChecks() {
}
static References getReferences() {
return StateTracker.getReferencesStack().getReferences();
}
/** Helper method to ensure that array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
static void ensureArrayVBOdisabled() {
if ( BufferObjectTracker.getVBOArrayStack().getState() != 0 )
if (StateTracker.getVBOArrayStack().getState() != 0)
throw new OpenGLException("Cannot use Buffers when Array Buffer Object is enabled");
}
/** Helper method to ensure that array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
static void ensureArrayVBOenabled() {
if ( BufferObjectTracker.getVBOArrayStack().getState() == 0 )
if (StateTracker.getVBOArrayStack().getState() == 0)
throw new OpenGLException("Cannot use offsets when Array Buffer Object is disabled");
}
/** Helper method to ensure that element array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
static void ensureElementVBOdisabled() {
if ( BufferObjectTracker.getVBOElementStack().getState() != 0 )
if (StateTracker.getVBOElementStack().getState() != 0)
throw new OpenGLException("Cannot use Buffers when Element Array Buffer Object is enabled");
}
/** Helper method to ensure that element array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
static void ensureElementVBOenabled() {
if ( BufferObjectTracker.getVBOElementStack().getState() == 0 )
if (StateTracker.getVBOElementStack().getState() == 0)
throw new OpenGLException("Cannot use offsets when Element Array Buffer Object is disabled");
}
/** Helper method to ensure that pixel pack buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
static void ensurePackPBOdisabled() {
if ( BufferObjectTracker.getPBOPackStack().getState() != 0 )
if (StateTracker.getPBOPackStack().getState() != 0)
throw new OpenGLException("Cannot use Buffers when Pixel Pack Buffer Object is enabled");
}
/** Helper method to ensure that pixel pack buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
static void ensurePackPBOenabled() {
if ( BufferObjectTracker.getPBOPackStack().getState() == 0 )
if (StateTracker.getPBOPackStack().getState() == 0)
throw new OpenGLException("Cannot use offsets when Pixel Pack Buffer Object is disabled");
}
/** Helper method to ensure that pixel unpack buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
static void ensureUnpackPBOdisabled() {
if ( BufferObjectTracker.getPBOUnpackStack().getState() != 0 )
if (StateTracker.getPBOUnpackStack().getState() != 0)
throw new OpenGLException("Cannot use Buffers when Pixel Unpack Buffer Object is enabled");
}
/** Helper method to ensure that pixel unpack buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
static void ensureUnpackPBOenabled() {
if ( BufferObjectTracker.getPBOUnpackStack().getState() == 0 )
if (StateTracker.getPBOUnpackStack().getState() == 0)
throw new OpenGLException("Cannot use offsets when Pixel Unpack Buffer Object is disabled");
}

View File

@ -45,65 +45,65 @@ public final class NVEvaluators {
private static native void nglEvalMapsNV(int target, int mode, long function_pointer);
public static void glGetMapAttribParameterNV(int target, int index, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_evaluators_glGetMapAttribParameterivNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetMapAttribParameterivNV(target, index, pname, params, params.position(), function_pointer);
}
private static native void nglGetMapAttribParameterivNV(int target, int index, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetMapAttribParameterNV(int target, int index, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_evaluators_glGetMapAttribParameterfvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetMapAttribParameterfvNV(target, index, pname, params, params.position(), function_pointer);
}
private static native void nglGetMapAttribParameterfvNV(int target, int index, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glGetMapParameterNV(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_evaluators_glGetMapParameterivNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetMapParameterivNV(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetMapParameterivNV(int target, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetMapParameterNV(int target, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_evaluators_glGetMapParameterfvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetMapParameterfvNV(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetMapParameterfvNV(int target, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glMapParameterNV(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_evaluators_glMapParameterivNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglMapParameterivNV(target, pname, params, params.position(), function_pointer);
}
private static native void nglMapParameterivNV(int target, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glMapParameterNV(int target, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_evaluators_glMapParameterfvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglMapParameterfvNV(target, pname, params, params.position(), function_pointer);
}
private static native void nglMapParameterfvNV(int target, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glMapControlPointsNV(int target, int index, int type, int ustride, int vstride, int uorder, int vorder, boolean packed, FloatBuffer pPoints) {
BufferChecks.checkDirect(pPoints);
long function_pointer = GLContext.getCapabilities().NV_evaluators_glMapControlPointsNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pPoints);
nglMapControlPointsNV(target, index, type, ustride, vstride, uorder, vorder, packed, pPoints, pPoints.position() << 2, function_pointer);
}
private static native void nglMapControlPointsNV(int target, int index, int type, int ustride, int vstride, int uorder, int vorder, boolean packed, Buffer pPoints, int pPoints_position, long function_pointer);
public static void glGetMapControlPointsNV(int target, int index, int type, int ustride, int vstride, boolean packed, FloatBuffer pPoints) {
BufferChecks.checkDirect(pPoints);
long function_pointer = GLContext.getCapabilities().NV_evaluators_glGetMapControlPointsNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pPoints);
nglGetMapControlPointsNV(target, index, type, ustride, vstride, packed, pPoints, pPoints.position() << 2, function_pointer);
}
private static native void nglGetMapControlPointsNV(int target, int index, int type, int ustride, int vstride, boolean packed, Buffer pPoints, int pPoints_position, long function_pointer);

View File

@ -17,9 +17,9 @@ public final class NVFence {
static native void initNativeStubs() throws LWJGLException;
public static void glGetFenceivNV(int fence, int pname, IntBuffer piParams) {
BufferChecks.checkBuffer(piParams, 4);
long function_pointer = GLContext.getCapabilities().NV_fence_glGetFenceivNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(piParams, 4);
nglGetFenceivNV(fence, pname, piParams, piParams.position(), function_pointer);
}
private static native void nglGetFenceivNV(int fence, int pname, IntBuffer piParams, int piParams_position, long function_pointer);
@ -55,17 +55,17 @@ public final class NVFence {
private static native void nglSetFenceNV(int fence, int condition, long function_pointer);
public static void glDeleteFencesNV(IntBuffer piFences) {
BufferChecks.checkDirect(piFences);
long function_pointer = GLContext.getCapabilities().NV_fence_glDeleteFencesNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(piFences);
nglDeleteFencesNV((piFences.remaining()), piFences, piFences.position(), function_pointer);
}
private static native void nglDeleteFencesNV(int n, IntBuffer piFences, int piFences_position, long function_pointer);
public static void glGenFencesNV(IntBuffer piFences) {
BufferChecks.checkDirect(piFences);
long function_pointer = GLContext.getCapabilities().NV_fence_glGenFencesNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(piFences);
nglGenFencesNV((piFences.remaining()), piFences, piFences.position(), function_pointer);
}
private static native void nglGenFencesNV(int n, IntBuffer piFences, int piFences_position, long function_pointer);

View File

@ -19,18 +19,18 @@ public final class NVFragmentProgram extends NVProgram {
static native void initNativeStubs() throws LWJGLException;
public static void glGetProgramNamedParameterNV(int id, ByteBuffer name, FloatBuffer params) {
BufferChecks.checkDirect(name);
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_fragment_program_glGetProgramNamedParameterfvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(name);
BufferChecks.checkBuffer(params, 4);
nglGetProgramNamedParameterfvNV(id, (name.remaining()), name, name.position(), params, params.position(), function_pointer);
}
private static native void nglGetProgramNamedParameterfvNV(int id, int length, ByteBuffer name, int name_position, FloatBuffer params, int params_position, long function_pointer);
public static void glProgramNamedParameter4fNV(int id, ByteBuffer name, float x, float y, float z, float w) {
BufferChecks.checkDirect(name);
long function_pointer = GLContext.getCapabilities().NV_fragment_program_glProgramNamedParameter4fNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(name);
nglProgramNamedParameter4fNV(id, (name.remaining()), name, name.position(), x, y, z, w, function_pointer);
}
private static native void nglProgramNamedParameter4fNV(int id, int length, ByteBuffer name, int name_position, float x, float y, float z, float w, long function_pointer);

View File

@ -15,33 +15,33 @@ public final class NVHalfFloat {
static native void initNativeStubs() throws LWJGLException;
public static void glVertexAttribs4NV(int index, ShortBuffer attribs) {
BufferChecks.checkDirect(attribs);
long function_pointer = GLContext.getCapabilities().NV_half_float_glVertexAttribs4hvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(attribs);
nglVertexAttribs4hvNV(index, (attribs.remaining()) >> 2, attribs, attribs.position(), function_pointer);
}
private static native void nglVertexAttribs4hvNV(int index, int n, ShortBuffer attribs, int attribs_position, long function_pointer);
public static void glVertexAttribs3NV(int index, ShortBuffer attribs) {
BufferChecks.checkDirect(attribs);
long function_pointer = GLContext.getCapabilities().NV_half_float_glVertexAttribs3hvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(attribs);
nglVertexAttribs3hvNV(index, (attribs.remaining()) / 3, attribs, attribs.position(), function_pointer);
}
private static native void nglVertexAttribs3hvNV(int index, int n, ShortBuffer attribs, int attribs_position, long function_pointer);
public static void glVertexAttribs2NV(int index, ShortBuffer attribs) {
BufferChecks.checkDirect(attribs);
long function_pointer = GLContext.getCapabilities().NV_half_float_glVertexAttribs2hvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(attribs);
nglVertexAttribs2hvNV(index, (attribs.remaining()) >> 1, attribs, attribs.position(), function_pointer);
}
private static native void nglVertexAttribs2hvNV(int index, int n, ShortBuffer attribs, int attribs_position, long function_pointer);
public static void glVertexAttribs1NV(int index, ShortBuffer attribs) {
BufferChecks.checkDirect(attribs);
long function_pointer = GLContext.getCapabilities().NV_half_float_glVertexAttribs1hvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(attribs);
nglVertexAttribs1hvNV(index, (attribs.remaining()), attribs, attribs.position(), function_pointer);
}
private static native void nglVertexAttribs1hvNV(int index, int n, ShortBuffer attribs, int attribs_position, long function_pointer);

View File

@ -20,17 +20,17 @@ public final class NVOcclusionQuery {
static native void initNativeStubs() throws LWJGLException;
public static void glGetOcclusionQueryNV(int id, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_occlusion_query_glGetOcclusionQueryivNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetOcclusionQueryivNV(id, pname, params, params.position(), function_pointer);
}
private static native void nglGetOcclusionQueryivNV(int id, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetOcclusionQueryuNV(int id, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_occlusion_query_glGetOcclusionQueryuivNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetOcclusionQueryuivNV(id, pname, params, params.position(), function_pointer);
}
private static native void nglGetOcclusionQueryuivNV(int id, int pname, IntBuffer params, int params_position, long function_pointer);
@ -58,17 +58,17 @@ public final class NVOcclusionQuery {
private static native boolean nglIsOcclusionQueryNV(int id, long function_pointer);
public static void glDeleteOcclusionQueriesNV(IntBuffer piIDs) {
BufferChecks.checkDirect(piIDs);
long function_pointer = GLContext.getCapabilities().NV_occlusion_query_glDeleteOcclusionQueriesNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(piIDs);
nglDeleteOcclusionQueriesNV((piIDs.remaining()), piIDs, piIDs.position(), function_pointer);
}
private static native void nglDeleteOcclusionQueriesNV(int n, IntBuffer piIDs, int piIDs_position, long function_pointer);
public static void glGenOcclusionQueriesNV(IntBuffer piIDs) {
BufferChecks.checkDirect(piIDs);
long function_pointer = GLContext.getCapabilities().NV_occlusion_query_glGenOcclusionQueriesNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(piIDs);
nglGenOcclusionQueriesNV((piIDs.remaining()), piIDs, piIDs.position(), function_pointer);
}
private static native void nglGenOcclusionQueriesNV(int n, IntBuffer piIDs, int piIDs_position, long function_pointer);

View File

@ -27,27 +27,27 @@ public final class NVPixelDataRange {
private static native void nglFlushPixelDataRangeNV(int target, long function_pointer);
public static void glPixelDataRangeNV(int target, ByteBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().NV_pixel_data_range_glPixelDataRangeNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglPixelDataRangeNV(target, (data.remaining()), data, data.position(), function_pointer);
}
public static void glPixelDataRangeNV(int target, FloatBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().NV_pixel_data_range_glPixelDataRangeNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglPixelDataRangeNV(target, (data.remaining() << 2), data, data.position() << 2, function_pointer);
}
public static void glPixelDataRangeNV(int target, IntBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().NV_pixel_data_range_glPixelDataRangeNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglPixelDataRangeNV(target, (data.remaining() << 2), data, data.position() << 2, function_pointer);
}
public static void glPixelDataRangeNV(int target, ShortBuffer data) {
BufferChecks.checkDirect(data);
long function_pointer = GLContext.getCapabilities().NV_pixel_data_range_glPixelDataRangeNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(data);
nglPixelDataRangeNV(target, (data.remaining() << 1), data, data.position() << 1, function_pointer);
}
private static native void nglPixelDataRangeNV(int target, int length, Buffer data, int data_position, long function_pointer);

View File

@ -17,9 +17,9 @@ public final class NVPointSprite {
static native void initNativeStubs() throws LWJGLException;
public static void glPointParameterNV(int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_point_sprite_glPointParameterivNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglPointParameterivNV(pname, params, params.position(), function_pointer);
}
private static native void nglPointParameterivNV(int pname, IntBuffer params, int params_position, long function_pointer);

View File

@ -17,20 +17,20 @@ public class NVProgram {
static native void initNativeStubs() throws LWJGLException;
public static void glRequestResidentProgramsNV(IntBuffer programIDs) {
BufferChecks.checkDirect(programIDs);
long function_pointer = GLContext.getCapabilities().NV_program_glRequestResidentProgramsNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(programIDs);
nglRequestResidentProgramsNV((programIDs.remaining()), programIDs, programIDs.position(), function_pointer);
}
private static native void nglRequestResidentProgramsNV(int n, IntBuffer programIDs, int programIDs_position, long function_pointer);
public static boolean glAreProgramsResidentNV(IntBuffer programIDs, ByteBuffer programResidences) {
BufferChecks.checkDirect(programIDs);
BufferChecks.checkDirect(programResidences);
if (programIDs.remaining() != programResidences.remaining())
throw new IllegalArgumentException("programIDs.remaining() != programResidences.remaining()");
long function_pointer = GLContext.getCapabilities().NV_program_glAreProgramsResidentNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(programIDs);
BufferChecks.checkDirect(programResidences);
boolean __result = nglAreProgramsResidentNV((programIDs.remaining()), programIDs, programIDs.position(), programResidences, programResidences.position(), function_pointer);
return __result;
}
@ -45,33 +45,33 @@ public class NVProgram {
private static native boolean nglIsProgramNV(int programID, long function_pointer);
public static void glGetProgramStringNV(int programID, int parameterName, ByteBuffer paramString) {
BufferChecks.checkDirect(paramString);
long function_pointer = GLContext.getCapabilities().NV_program_glGetProgramStringNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(paramString);
nglGetProgramStringNV(programID, parameterName, paramString, paramString.position(), function_pointer);
}
private static native void nglGetProgramStringNV(int programID, int parameterName, Buffer paramString, int paramString_position, long function_pointer);
public static void glGetProgramNV(int programID, int parameterName, IntBuffer params) {
BufferChecks.checkDirect(params);
long function_pointer = GLContext.getCapabilities().NV_program_glGetProgramivNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(params);
nglGetProgramivNV(programID, parameterName, params, params.position(), function_pointer);
}
private static native void nglGetProgramivNV(int programID, int parameterName, IntBuffer params, int params_position, long function_pointer);
public static void glGenProgramsNV(IntBuffer programs) {
BufferChecks.checkDirect(programs);
long function_pointer = GLContext.getCapabilities().NV_program_glGenProgramsNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(programs);
nglGenProgramsNV((programs.remaining()), programs, programs.position(), function_pointer);
}
private static native void nglGenProgramsNV(int n, IntBuffer programs, int programs_position, long function_pointer);
public static void glDeleteProgramsNV(IntBuffer programs) {
BufferChecks.checkDirect(programs);
long function_pointer = GLContext.getCapabilities().NV_program_glDeleteProgramsNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(programs);
nglDeleteProgramsNV((programs.remaining()), programs, programs.position(), function_pointer);
}
private static native void nglDeleteProgramsNV(int n, IntBuffer programs, int programs_position, long function_pointer);
@ -84,9 +84,9 @@ public class NVProgram {
private static native void nglBindProgramNV(int target, int programID, long function_pointer);
public static void glLoadProgramNV(int target, int programID, ByteBuffer string) {
BufferChecks.checkDirect(string);
long function_pointer = GLContext.getCapabilities().NV_program_glLoadProgramNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(string);
nglLoadProgramNV(target, programID, (string.remaining()), string, string.position(), function_pointer);
}
private static native void nglLoadProgramNV(int target, int programID, int length, Buffer string, int string_position, long function_pointer);

View File

@ -65,49 +65,49 @@ public final class NVRegisterCombiners {
static native void initNativeStubs() throws LWJGLException;
public static void glGetFinalCombinerInputParameterNV(int variable, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_register_combiners_glGetFinalCombinerInputParameterivNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetFinalCombinerInputParameterivNV(variable, pname, params, params.position(), function_pointer);
}
private static native void nglGetFinalCombinerInputParameterivNV(int variable, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetFinalCombinerInputParameterNV(int variable, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_register_combiners_glGetFinalCombinerInputParameterfvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetFinalCombinerInputParameterfvNV(variable, pname, params, params.position(), function_pointer);
}
private static native void nglGetFinalCombinerInputParameterfvNV(int variable, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glGetCombinerOutputParameterNV(int stage, int portion, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_register_combiners_glGetCombinerOutputParameterivNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetCombinerOutputParameterivNV(stage, portion, pname, params, params.position(), function_pointer);
}
private static native void nglGetCombinerOutputParameterivNV(int stage, int portion, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetCombinerOutputParameterNV(int stage, int portion, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_register_combiners_glGetCombinerOutputParameterfvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetCombinerOutputParameterfvNV(stage, portion, pname, params, params.position(), function_pointer);
}
private static native void nglGetCombinerOutputParameterfvNV(int stage, int portion, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glGetCombinerInputParameterNV(int stage, int portion, int variable, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_register_combiners_glGetCombinerInputParameterivNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetCombinerInputParameterivNV(stage, portion, variable, pname, params, params.position(), function_pointer);
}
private static native void nglGetCombinerInputParameterivNV(int stage, int portion, int variable, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetCombinerInputParameterNV(int stage, int portion, int variable, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_register_combiners_glGetCombinerInputParameterfvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetCombinerInputParameterfvNV(stage, portion, variable, pname, params, params.position(), function_pointer);
}
private static native void nglGetCombinerInputParameterfvNV(int stage, int portion, int variable, int pname, FloatBuffer params, int params_position, long function_pointer);
@ -134,9 +134,9 @@ public final class NVRegisterCombiners {
private static native void nglCombinerInputNV(int stage, int portion, int variable, int input, int mapping, int componentUsage, long function_pointer);
public static void glCombinerParameterNV(int pname, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_register_combiners_glCombinerParameterivNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglCombinerParameterivNV(pname, params, params.position(), function_pointer);
}
private static native void nglCombinerParameterivNV(int pname, IntBuffer params, int params_position, long function_pointer);
@ -149,9 +149,9 @@ public final class NVRegisterCombiners {
private static native void nglCombinerParameteriNV(int pname, int param, long function_pointer);
public static void glCombinerParameterNV(int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_register_combiners_glCombinerParameterfvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglCombinerParameterfvNV(pname, params, params.position(), function_pointer);
}
private static native void nglCombinerParameterfvNV(int pname, FloatBuffer params, int params_position, long function_pointer);

View File

@ -15,17 +15,17 @@ public final class NVRegisterCombiners2 {
static native void initNativeStubs() throws LWJGLException;
public static void glGetCombinerStageParameterNV(int stage, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_register_combiners2_glGetCombinerStageParameterfvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetCombinerStageParameterfvNV(stage, pname, params, params.position(), function_pointer);
}
private static native void nglGetCombinerStageParameterfvNV(int stage, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glCombinerStageParameterNV(int stage, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_register_combiners2_glCombinerStageParameterfvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglCombinerStageParameterfvNV(stage, pname, params, params.position(), function_pointer);
}
private static native void nglCombinerStageParameterfvNV(int stage, int pname, FloatBuffer params, int params_position, long function_pointer);

View File

@ -19,9 +19,9 @@ public final class NVVertexArrayRange {
static native void initNativeStubs() throws LWJGLException;
public static void glFreeMemoryNV(ByteBuffer pointer) {
BufferChecks.checkDirect(pointer);
long function_pointer = GLContext.getCapabilities().NV_vertex_array_range_glFreeMemoryNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pointer);
nglFreeMemoryNV(pointer, pointer.position(), function_pointer);
}
private static native void nglFreeMemoryNV(Buffer pointer, int pointer_position, long function_pointer);
@ -42,27 +42,27 @@ public final class NVVertexArrayRange {
private static native void nglFlushVertexArrayRangeNV(long function_pointer);
public static void glVertexArrayRangeNV(ByteBuffer pPointer) {
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().NV_vertex_array_range_glVertexArrayRangeNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pPointer);
nglVertexArrayRangeNV((pPointer.remaining()), pPointer, pPointer.position(), function_pointer);
}
public static void glVertexArrayRangeNV(FloatBuffer pPointer) {
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().NV_vertex_array_range_glVertexArrayRangeNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pPointer);
nglVertexArrayRangeNV((pPointer.remaining() << 2), pPointer, pPointer.position() << 2, function_pointer);
}
public static void glVertexArrayRangeNV(IntBuffer pPointer) {
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().NV_vertex_array_range_glVertexArrayRangeNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pPointer);
nglVertexArrayRangeNV((pPointer.remaining() << 2), pPointer, pPointer.position() << 2, function_pointer);
}
public static void glVertexArrayRangeNV(ShortBuffer pPointer) {
BufferChecks.checkDirect(pPointer);
long function_pointer = GLContext.getCapabilities().NV_vertex_array_range_glVertexArrayRangeNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(pPointer);
nglVertexArrayRangeNV((pPointer.remaining() << 1), pPointer, pPointer.position() << 1, function_pointer);
}
private static native void nglVertexArrayRangeNV(int size, Buffer pPointer, int pPointer_position, long function_pointer);

View File

@ -92,65 +92,65 @@ public final class NVVertexProgram extends NVProgram {
static native void initNativeStubs() throws LWJGLException;
public static void glVertexAttribs4NV(int index, FloatBuffer v) {
BufferChecks.checkDirect(v);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glVertexAttribs4fvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(v);
nglVertexAttribs4fvNV(index, (v.remaining()) >> 2, v, v.position(), function_pointer);
}
private static native void nglVertexAttribs4fvNV(int index, int n, FloatBuffer v, int v_position, long function_pointer);
public static void glVertexAttribs4NV(int index, ShortBuffer v) {
BufferChecks.checkDirect(v);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glVertexAttribs4svNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(v);
nglVertexAttribs4svNV(index, (v.remaining()) >> 2, v, v.position(), function_pointer);
}
private static native void nglVertexAttribs4svNV(int index, int n, ShortBuffer v, int v_position, long function_pointer);
public static void glVertexAttribs3NV(int index, FloatBuffer v) {
BufferChecks.checkDirect(v);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glVertexAttribs3fvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(v);
nglVertexAttribs3fvNV(index, (v.remaining()) / 3, v, v.position(), function_pointer);
}
private static native void nglVertexAttribs3fvNV(int index, int n, FloatBuffer v, int v_position, long function_pointer);
public static void glVertexAttribs3NV(int index, ShortBuffer v) {
BufferChecks.checkDirect(v);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glVertexAttribs3svNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(v);
nglVertexAttribs3svNV(index, (v.remaining()) / 3, v, v.position(), function_pointer);
}
private static native void nglVertexAttribs3svNV(int index, int n, ShortBuffer v, int v_position, long function_pointer);
public static void glVertexAttribs2NV(int index, FloatBuffer v) {
BufferChecks.checkDirect(v);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glVertexAttribs2fvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(v);
nglVertexAttribs2fvNV(index, (v.remaining()) >> 1, v, v.position(), function_pointer);
}
private static native void nglVertexAttribs2fvNV(int index, int n, FloatBuffer v, int v_position, long function_pointer);
public static void glVertexAttribs2NV(int index, ShortBuffer v) {
BufferChecks.checkDirect(v);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glVertexAttribs2svNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(v);
nglVertexAttribs2svNV(index, (v.remaining()) >> 1, v, v.position(), function_pointer);
}
private static native void nglVertexAttribs2svNV(int index, int n, ShortBuffer v, int v_position, long function_pointer);
public static void glVertexAttribs1NV(int index, FloatBuffer v) {
BufferChecks.checkDirect(v);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glVertexAttribs1fvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(v);
nglVertexAttribs1fvNV(index, (v.remaining()), v, v.position(), function_pointer);
}
private static native void nglVertexAttribs1fvNV(int index, int n, FloatBuffer v, int v_position, long function_pointer);
public static void glVertexAttribs1NV(int index, ShortBuffer v) {
BufferChecks.checkDirect(v);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glVertexAttribs1svNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(v);
nglVertexAttribs1svNV(index, (v.remaining()), v, v.position(), function_pointer);
}
private static native void nglVertexAttribs1svNV(int index, int n, ShortBuffer v, int v_position, long function_pointer);
@ -219,38 +219,42 @@ public final class NVVertexProgram extends NVProgram {
private static native void nglVertexAttrib1sNV(int index, short x, long function_pointer);
public static void glVertexAttribPointerNV(int index, int size, int type, int stride, FloatBuffer buffer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glVertexAttribPointerNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
GLChecks.getReferences().NV_vertex_program_glVertexAttribPointerNV_buffer = buffer;
nglVertexAttribPointerNV(index, size, type, stride, buffer, buffer.position() << 2, function_pointer);
}
public static void glVertexAttribPointerNV(int index, int size, int type, int stride, ByteBuffer buffer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glVertexAttribPointerNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
GLChecks.getReferences().NV_vertex_program_glVertexAttribPointerNV_buffer = buffer;
nglVertexAttribPointerNV(index, size, type, stride, buffer, buffer.position(), function_pointer);
}
public static void glVertexAttribPointerNV(int index, int size, int type, int stride, IntBuffer buffer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glVertexAttribPointerNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
GLChecks.getReferences().NV_vertex_program_glVertexAttribPointerNV_buffer = buffer;
nglVertexAttribPointerNV(index, size, type, stride, buffer, buffer.position() << 2, function_pointer);
}
public static void glVertexAttribPointerNV(int index, int size, int type, int stride, ShortBuffer buffer) {
GLBufferChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glVertexAttribPointerNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOdisabled();
BufferChecks.checkDirect(buffer);
GLChecks.getReferences().NV_vertex_program_glVertexAttribPointerNV_buffer = buffer;
nglVertexAttribPointerNV(index, size, type, stride, buffer, buffer.position() << 1, function_pointer);
}
private static native void nglVertexAttribPointerNV(int index, int size, int type, int stride, Buffer buffer, int buffer_position, long function_pointer);
public static void glVertexAttribPointerNV(int index, int size, int type, int stride, int buffer_buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glVertexAttribPointerNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
GLChecks.ensureArrayVBOenabled();
nglVertexAttribPointerNVBO(index, size, type, stride, buffer_buffer_offset, function_pointer);
}
private static native void nglVertexAttribPointerNVBO(int index, int size, int type, int stride, int buffer_buffer_offset, long function_pointer);
@ -263,9 +267,9 @@ public final class NVVertexProgram extends NVProgram {
private static native void nglTrackMatrixNV(int target, int address, int matrix, int transform, long function_pointer);
public static void glProgramParameters4NV(int target, int index, FloatBuffer params) {
BufferChecks.checkDirect(params);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glProgramParameters4fvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkDirect(params);
nglProgramParameters4fvNV(target, index, (params.remaining()) >> 2, params, params.position(), function_pointer);
}
private static native void nglProgramParameters4fvNV(int target, int index, int count, FloatBuffer params, int params_position, long function_pointer);
@ -286,41 +290,41 @@ public final class NVVertexProgram extends NVProgram {
private static native java.nio.ByteBuffer nglGetVertexAttribPointervNV(int index, int parameterName, int result_size, long function_pointer);
public static void glGetVertexAttribNV(int index, int parameterName, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glGetVertexAttribivNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetVertexAttribivNV(index, parameterName, params, params.position(), function_pointer);
}
private static native void nglGetVertexAttribivNV(int index, int parameterName, IntBuffer params, int params_position, long function_pointer);
public static void glGetVertexAttribNV(int index, int parameterName, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glGetVertexAttribfvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetVertexAttribfvNV(index, parameterName, params, params.position(), function_pointer);
}
private static native void nglGetVertexAttribfvNV(int index, int parameterName, FloatBuffer params, int params_position, long function_pointer);
public static void glGetTrackMatrixNV(int target, int address, int parameterName, IntBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glGetTrackMatrixivNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetTrackMatrixivNV(target, address, parameterName, params, params.position(), function_pointer);
}
private static native void nglGetTrackMatrixivNV(int target, int address, int parameterName, IntBuffer params, int params_position, long function_pointer);
public static void glGetProgramParameterNV(int target, int index, int parameterName, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glGetProgramParameterfvNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglGetProgramParameterfvNV(target, index, parameterName, params, params.position(), function_pointer);
}
private static native void nglGetProgramParameterfvNV(int target, int index, int parameterName, FloatBuffer params, int params_position, long function_pointer);
public static void glExecuteProgramNV(int target, int id, FloatBuffer params) {
BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glExecuteProgramNV_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
BufferChecks.checkBuffer(params, 4);
nglExecuteProgramNV(target, id, params, params.position(), function_pointer);
}
private static native void nglExecuteProgramNV(int target, int id, FloatBuffer params, int params_position, long function_pointer);

View File

@ -0,0 +1,43 @@
/* MACHINE GENERATED FILE, DO NOT EDIT */
package org.lwjgl.opengl;
class References {
java.nio.Buffer ARB_matrix_palette_glMatrixIndexPointerARB_pPointer;
java.nio.Buffer ARB_vertex_blend_glWeightPointerARB_pPointer;
java.nio.Buffer ARB_vertex_program_glVertexAttribPointerARB_buffer;
java.nio.Buffer ATI_element_array_glElementPointerATI_pPointer;
java.nio.Buffer EXT_fog_coord_glFogCoordPointerEXT_data;
java.nio.Buffer EXT_secondary_color_glSecondaryColorPointerEXT_pPointer;
java.nio.Buffer EXT_vertex_shader_glVariantPointerEXT_pAddr;
java.nio.Buffer EXT_vertex_weighting_glVertexWeightPointerEXT_pPointer;
java.nio.Buffer GL11_glTexCoordPointer_pointer;
java.nio.Buffer GL11_glVertexPointer_pointer;
java.nio.IntBuffer GL11_glSelectBuffer_buffer;
java.nio.Buffer GL11_glNormalPointer_pointer;
java.nio.Buffer GL11_glEdgeFlagPointer_pointer;
java.nio.Buffer GL11_glColorPointer_pointer;
java.nio.Buffer GL14_glFogCoordPointer_data;
java.nio.Buffer GL20_glVertexAttribPointer_buffer;
java.nio.Buffer NV_vertex_program_glVertexAttribPointerNV_buffer;
void copy(References references) {
this.ARB_matrix_palette_glMatrixIndexPointerARB_pPointer = references.ARB_matrix_palette_glMatrixIndexPointerARB_pPointer;
this.ARB_vertex_blend_glWeightPointerARB_pPointer = references.ARB_vertex_blend_glWeightPointerARB_pPointer;
this.ARB_vertex_program_glVertexAttribPointerARB_buffer = references.ARB_vertex_program_glVertexAttribPointerARB_buffer;
this.ATI_element_array_glElementPointerATI_pPointer = references.ATI_element_array_glElementPointerATI_pPointer;
this.EXT_fog_coord_glFogCoordPointerEXT_data = references.EXT_fog_coord_glFogCoordPointerEXT_data;
this.EXT_secondary_color_glSecondaryColorPointerEXT_pPointer = references.EXT_secondary_color_glSecondaryColorPointerEXT_pPointer;
this.EXT_vertex_shader_glVariantPointerEXT_pAddr = references.EXT_vertex_shader_glVariantPointerEXT_pAddr;
this.EXT_vertex_weighting_glVertexWeightPointerEXT_pPointer = references.EXT_vertex_weighting_glVertexWeightPointerEXT_pPointer;
this.GL11_glTexCoordPointer_pointer = references.GL11_glTexCoordPointer_pointer;
this.GL11_glVertexPointer_pointer = references.GL11_glVertexPointer_pointer;
this.GL11_glSelectBuffer_buffer = references.GL11_glSelectBuffer_buffer;
this.GL11_glNormalPointer_pointer = references.GL11_glNormalPointer_pointer;
this.GL11_glEdgeFlagPointer_pointer = references.GL11_glEdgeFlagPointer_pointer;
this.GL11_glColorPointer_pointer = references.GL11_glColorPointer_pointer;
this.GL14_glFogCoordPointer_data = references.GL14_glFogCoordPointer_data;
this.GL20_glVertexAttribPointer_buffer = references.GL20_glVertexAttribPointer_buffer;
this.NV_vertex_program_glVertexAttribPointerNV_buffer = references.NV_vertex_program_glVertexAttribPointerNV_buffer;
}
}

View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2002-2004 LWJGL Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'LWJGL' nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.lwjgl.opengl;
class ReferencesStack {
private final References[] references_stack;
private int stack_pos;
public References getReferences() {
return references_stack[stack_pos];
}
public void pushState() {
stack_pos++;
references_stack[stack_pos].copy(references_stack[stack_pos - 1]);
}
public References popState() {
References result = references_stack[stack_pos];
stack_pos--;
return result;
}
ReferencesStack(int stack_size) {
references_stack = new References[stack_size];
stack_pos = 0;
for (int i = 0; i < references_stack.length; i++)
references_stack[i] = new References();
}
}

View File

@ -37,16 +37,18 @@ import java.util.Map;
import java.nio.IntBuffer;
/** Track Vertex Buffer Objects by context. */
final class BufferObjectTracker {
final class StateTracker {
private final StateStack vbo_array_stack;
private final StateStack vbo_element_stack;
private final StateStack pbo_pack_stack;
private final StateStack pbo_unpack_stack;
private final ReferencesStack references_stack;
private final StateStack attrib_stack;
BufferObjectTracker() {
StateTracker() {
int stack_size = Math.max(1, Util.glGetInteger(GL11.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH));
vbo_array_stack = new StateStack(stack_size, 0);
@ -55,6 +57,8 @@ final class BufferObjectTracker {
pbo_pack_stack = new StateStack(stack_size, 0);
pbo_unpack_stack = new StateStack(stack_size, 0);
references_stack = new ReferencesStack(stack_size);
attrib_stack = new StateStack(stack_size, 0);
}
@ -64,6 +68,7 @@ final class BufferObjectTracker {
getVBOElementStack().popState();
getPBOPackStack().popState();
getPBOUnpackStack().popState();
getReferencesStack().popState();
}
}
@ -75,6 +80,7 @@ final class BufferObjectTracker {
getVBOElementStack().pushState();
getPBOPackStack().pushState();
getPBOUnpackStack().pushState();
getReferencesStack().pushState();
}
}
@ -127,7 +133,11 @@ final class BufferObjectTracker {
return GLContext.getCapabilities().tracker.pbo_unpack_stack;
}
static StateStack getClientAttribStack() {
static ReferencesStack getReferencesStack() {
return GLContext.getCapabilities().tracker.references_stack;
}
private static StateStack getClientAttribStack() {
return GLContext.getCapabilities().tracker.attrib_stack;
}
}

View File

@ -63,7 +63,7 @@ public class MouseTest {
/** Height of window */
private static int WINDOW_HEIGHT = 640;
/** Triangle size (in ½) */
/** Triangle size */
private Vector2f triangleSize = new Vector2f(120, 100);
/** Triangle color */

View File

@ -64,7 +64,7 @@ public class ContextCapabilitiesGenerator {
public static void generateClassPrologue(PrintWriter writer, boolean context_specific) {
writer.println("public class " + Utils.CONTEXT_CAPS_CLASS_NAME + " {");
writer.println("\tfinal BufferObjectTracker tracker;");
writer.println("\tfinal StateTracker tracker;");
writer.println();
if (!context_specific) {
writer.println("\tprivate static boolean " + STUBS_LOADED_NAME + " = false;");
@ -74,7 +74,7 @@ public class ContextCapabilitiesGenerator {
public static void generateInitializerPrologue(PrintWriter writer) {
writer.println("\t" + Utils.CONTEXT_CAPS_CLASS_NAME + "() throws LWJGLException {");
writer.println("\t\tSet " + CACHED_EXTS_VAR_NAME + " = " + ALL_INIT_METHOD_NAME + "();");
writer.println("\t\ttracker = new BufferObjectTracker();");
writer.println("\t\ttracker = new StateTracker();");
}
private static String translateFieldName(String interface_name) {

View File

@ -54,8 +54,7 @@ import static com.sun.mirror.util.DeclarationVisitors.*;
/**
* $Id$
*
* Generator tool for creating the java classes and native code
* from an annotated template java interface.
* Generator tool for creating the ContexCapabilities class
*
* @author elias_naur <elias_naur@users.sourceforge.net>
* @version $Revision$

View File

@ -138,6 +138,8 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor {
throw new RuntimeException(param + " has no Check, Result nor Constant annotation and no other parameters has" +
" an @AutoSize annotation on it in method " + method);
}
if (param.getAnnotation(CachedReference.class) != null && param.getAnnotation(Result.class) != null)
throw new RuntimeException(param + " can't be annotated with both CachedReference and Result");
if (param.getAnnotation(BufferObject.class) != null && param.getAnnotation(Result.class) != null)
throw new RuntimeException(param + " can't be annotated with both BufferObject and Result");
if (param.getAnnotation(Constant.class) != null)
@ -145,6 +147,8 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor {
} else {
if (param.getAnnotation(BufferObject.class) != null)
throw new RuntimeException(param + " type is not a buffer, but annotated as a BufferObject");
if (param.getAnnotation(CachedReference.class) != null)
throw new RuntimeException(param + " type is not a buffer, but annotated as a CachedReference");
}
}
}

View File

@ -153,7 +153,7 @@ public class JavaMethodsGenerator {
private static void printBufferObjectCheck(PrintWriter writer, BufferKind kind, Mode mode) {
String bo_check_method_name = kind.toString();
writer.print("\t\tGLBufferChecks.ensure" + bo_check_method_name);
writer.print("\t\t" + Utils.CHECKS_CLASS_NAME + ".ensure" + bo_check_method_name);
if (mode == Mode.BUFFEROBJECT)
writer.print("enabled");
else
@ -184,8 +184,6 @@ public class JavaMethodsGenerator {
generateParametersJava(writer, method, typeinfos_instance, false, mode);
TypeMirror result_type = Utils.getMethodReturnType(method);
writer.println(") {");
printBufferObjectChecks(writer, method, mode);
printParameterChecks(writer, method, mode);
Code code_annotation = method.getAnnotation(Code.class);
if (code_annotation != null)
writer.println(code_annotation.value());
@ -195,6 +193,9 @@ public class JavaMethodsGenerator {
writer.print("\t\tBufferChecks.checkFunctionAddress(");
writer.println(Utils.FUNCTION_POINTER_VAR_NAME + ");");
}
printBufferObjectChecks(writer, method, mode);
printParameterChecks(writer, method, mode);
printParameterCaching(writer, interface_decl, method, mode);
writer.print("\t\t");
boolean has_result = !result_type.equals(env.getTypeUtils().getVoidType());
if (has_result) {
@ -391,6 +392,20 @@ public class JavaMethodsGenerator {
return first_parameter;
}
private static void printParameterCaching(PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method, Mode mode) {
for (ParameterDeclaration param : method.getParameters()) {
Class java_type = Utils.getJavaType(param.getType());
if (Buffer.class.isAssignableFrom(java_type) &&
param.getAnnotation(CachedReference.class) != null &&
(mode != Mode.BUFFEROBJECT || param.getAnnotation(BufferObject.class) == null) &&
param.getAnnotation(Result.class) == null) {
writer.print("\t\t" + Utils.CHECKS_CLASS_NAME + ".getReferences().");
writer.print(Utils.getReferenceName(interface_decl, method, param) + " = ");
writer.println(param.getSimpleName() + ";");
}
}
}
private static void printParameterChecks(PrintWriter writer, MethodDeclaration method, Mode mode) {
for (ParameterDeclaration param : method.getParameters()) {
Class java_type = Utils.getJavaType(param.getType());

View File

@ -0,0 +1,170 @@
/*
* Copyright (c) 2002-2004 LWJGL Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'LWJGL' nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.lwjgl.util.generator;
import com.sun.mirror.apt.*;
import com.sun.mirror.declaration.*;
import com.sun.mirror.type.*;
import com.sun.mirror.util.*;
import java.util.Collection;
import java.util.Collections;
import java.util.Set;
import java.util.Iterator;
import java.util.Map;
import java.util.Arrays;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.File;
import static java.util.Collections.*;
import static com.sun.mirror.util.DeclarationVisitors.*;
/**
* $Id$
*
* Generator tool for creating the References class
*
* @author elias_naur <elias_naur@users.sourceforge.net>
* @version $Revision$
*/
public class ReferencesGeneratorProcessorFactory implements AnnotationProcessorFactory, RoundCompleteListener {
private final static String REFERENCES_CLASS_NAME = "References";
private final static String REFERENCES_PARAMETER_NAME = "references";
private static boolean first_round = true;
// Process any set of annotations
private static final Collection<String> supportedAnnotations =
unmodifiableCollection(Arrays.asList("*"));
public Collection<String> supportedAnnotationTypes() {
return supportedAnnotations;
}
public Collection<String> supportedOptions() {
return emptyList();
}
public void roundComplete(RoundCompleteEvent event) {
first_round = false;
}
public AnnotationProcessor getProcessorFor(Set<AnnotationTypeDeclaration> atds, AnnotationProcessorEnvironment env) {
// Only process the initial types, not the generated ones
if (first_round) {
env.addListener(this);
return new GeneratorProcessor(env);
} else
return AnnotationProcessors.NO_OP;
}
private static class GeneratorProcessor implements AnnotationProcessor {
private final AnnotationProcessorEnvironment env;
GeneratorProcessor(AnnotationProcessorEnvironment env) {
this.env = env;
}
public void process() {
try {
generateReferencesSource();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
private static void generateCopiesFromParameters(PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method) {
for (ParameterDeclaration param : method.getParameters()) {
CachedReference cached_reference_annotation = param.getAnnotation(CachedReference.class);
if (cached_reference_annotation != null) {
Class nio_type = Utils.getNIOBufferType(param.getType());
String reference_name = Utils.getReferenceName(interface_decl, method, param);
writer.print("\t\tthis." + reference_name + " = ");
writer.println(REFERENCES_PARAMETER_NAME + "." + reference_name + ";");
}
}
}
private static void generateCopiesFromMethods(PrintWriter writer, InterfaceDeclaration interface_decl) {
for (MethodDeclaration method : interface_decl.getMethods()) {
generateCopiesFromParameters(writer, interface_decl, method);
}
}
private static void generateReferencesFromParameters(PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method) {
for (ParameterDeclaration param : method.getParameters()) {
CachedReference cached_reference_annotation = param.getAnnotation(CachedReference.class);
if (cached_reference_annotation != null) {
Class nio_type = Utils.getNIOBufferType(param.getType());
if (nio_type == null)
throw new RuntimeException(param + " in method " + method + " in " + interface_decl + " is annotated with "
+ cached_reference_annotation.annotationType().getSimpleName() + " but the parameter is not a NIO buffer");
writer.print("\t" + nio_type.getName() + " " + Utils.getReferenceName(interface_decl, method, param));
writer.println(";");
}
}
}
private static void generateReferencesFromMethods(PrintWriter writer, InterfaceDeclaration interface_decl) {
for (MethodDeclaration method : interface_decl.getMethods()) {
generateReferencesFromParameters(writer, interface_decl, method);
}
}
private void generateReferencesSource() throws IOException {
PrintWriter writer = env.getFiler().createSourceFile("org.lwjgl.opengl." + REFERENCES_CLASS_NAME);
writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */");
writer.println();
writer.println("package org.lwjgl.opengl;");
writer.println();
writer.println("class " + REFERENCES_CLASS_NAME + " {");
DeclarationFilter filter = DeclarationFilter.getFilter(InterfaceDeclaration.class);
Collection<TypeDeclaration> interface_decls = filter.filter(env.getSpecifiedTypeDeclarations());
for (TypeDeclaration typedecl : interface_decls) {
InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
generateReferencesFromMethods(writer, interface_decl);
}
writer.println();
writer.println("\tvoid copy(" + REFERENCES_CLASS_NAME + " " + REFERENCES_PARAMETER_NAME + ") {");
for (TypeDeclaration typedecl : interface_decls) {
InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
generateCopiesFromMethods(writer, interface_decl);
}
writer.println("\t}");
writer.println("}");
writer.close();
}
}
}

View File

@ -51,6 +51,7 @@ public class Utils {
public static final String TYPEDEF_POSTFIX = "PROC";
public static final String FUNCTION_POINTER_VAR_NAME = "function_pointer";
public static final String FUNCTION_POINTER_POSTFIX = "_pointer";
public static final String CHECKS_CLASS_NAME = "GLChecks";
public static final String CONTEXT_CAPS_CLASS_NAME = "ContextCapabilities";
public static final String STUB_INITIALIZER_NAME = "initNativeStubs";
public static final String BUFFER_OBJECT_METHOD_POSTFIX = "BO";
@ -92,6 +93,10 @@ public class Utils {
return annotation_list;
}
public static String getReferenceName(InterfaceDeclaration interface_decl, MethodDeclaration method, ParameterDeclaration param) {
return interface_decl.getSimpleName() + "_" + method.getSimpleName() + "_" + param.getSimpleName();
}
public static boolean isAddressableType(TypeMirror type) {
return isAddressableType(getJavaType(type));
}

View File

@ -1,6 +1,4 @@
#!/bin/bash
./autogen.sh
./configure
cd linux
make
strip .libs/liblwjgl.0.0.0

View File

@ -66,9 +66,9 @@ public interface ARB_buffer_object {
int GL_BUFFER_MAPPED_ARB = 0x88BC;
int GL_BUFFER_MAP_POINTER_ARB = 0x88BD;
@Code( " BufferObjectTracker.bindBuffer(target, buffer);")
@Code( " StateTracker.bindBuffer(target, buffer);")
void glBindBufferARB(@GLenum int target, @GLuint int buffer);
@Code( " BufferObjectTracker.deleteBuffers(buffers);")
@Code( " StateTracker.deleteBuffers(buffers);")
void glDeleteBuffersARB(@AutoSize("buffers") @GLsizei int n, @Const @GLuint IntBuffer buffers);
void glGenBuffersARB(@AutoSize("buffers") int n, @GLuint IntBuffer buffers);
boolean glIsBufferARB(@GLuint int buffer);

View File

@ -203,7 +203,7 @@ public interface ARB_imaging {
void glConvolutionFilter1D(@GLenum int target, @GLenum int internalformat, @GLsizei int width, @GLenum int format, @GLenum int type,
@BufferObject(BufferKind.UnpackPBO)
@Check("GLBufferChecks.calculateImageStorage(image, format, type, width, 1, 1)")
@Check("GLChecks.calculateImageStorage(image, format, type, width, 1, 1)")
@GLbyte
@GLshort
@GLint
@ -212,7 +212,7 @@ public interface ARB_imaging {
void glConvolutionFilter2D(@GLenum int target, @GLenum int internalformat, @GLsizei int width, @GLsizei int height, @GLenum int format, @GLenum int type,
@BufferObject(BufferKind.UnpackPBO)
@Check("GLBufferChecks.calculateImageStorage(image, format, type, width, height, 1)")
@Check("GLChecks.calculateImageStorage(image, format, type, width, height, 1)")
@GLbyte
@GLshort
@GLint

View File

@ -53,6 +53,7 @@ public interface ARB_matrix_palette {
void glCurrentPaletteMatrixARB(int index);
void glMatrixIndexPointerARB(int size, @AutoType("pPointer") @GLenum int type, @GLsizei int stride,
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@GLubyte

View File

@ -100,6 +100,7 @@ public interface ARB_vertex_blend {
void glWeightuivARB(@AutoSize("pWeights") int size, @GLuint IntBuffer pWeights);
void glWeightPointerARB(int size, @AutoType("pPointer") @GLenum int type, @GLsizei int stride,
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@Const

View File

@ -106,6 +106,7 @@ public interface ARB_vertex_program extends ARB_program {
void glVertexAttrib4NubARB(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w);
void glVertexAttribPointerARB(@GLuint int index, int size, @AutoType("buffer") @GLenum int type, boolean normalized, @GLsizei int stride,
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@Const

View File

@ -41,6 +41,7 @@ public interface ATI_element_array {
int GL_ELEMENT_ARRAY_POINTER_ATI = 0x876A;
void glElementPointerATI(@AutoType("pPointer") @GLenum int type,
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@Const

View File

@ -48,6 +48,7 @@ public interface EXT_fog_coord {
void glFogCoordfEXT(float coord);
void glFogCoordPointerEXT(@AutoType("data") @GLenum int type, @GLsizei int stride,
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@Const

View File

@ -66,7 +66,7 @@ public interface EXT_paletted_texture {
int GL_TEXTURE_INDEX_SIZE_EXT = 0x80ED;
void glColorTableEXT(@GLenum int target, @GLenum int internalFormat, @GLsizei int width, @GLenum int format, @GLenum int type,
@Check("GLBufferChecks.calculateImageStorage(data, format, type, width, 1, 1)")
@Check("GLChecks.calculateImageStorage(data, format, type, width, 1, 1)")
@Const
@GLbyte
@GLshort
@ -75,7 +75,7 @@ public interface EXT_paletted_texture {
Buffer data);
void glColorSubTableEXT(@GLenum int target, @GLsizei int start, @GLsizei int count, @GLenum int format, @GLenum int type,
@Check("GLBufferChecks.calculateImageStorage(data, format, type, count, 1, 1)")
@Check("GLChecks.calculateImageStorage(data, format, type, count, 1, 1)")
@Const
@GLbyte
@GLshort

View File

@ -51,6 +51,7 @@ public interface EXT_secondary_color {
void glSecondaryColor3ubEXT(@GLubyte byte red, @GLubyte byte green, @GLubyte byte blue);
void glSecondaryColorPointerEXT(int size, @AutoType("pPointer") @GLenum int type, @GLsizei int stride,
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@GLbyte

View File

@ -216,6 +216,7 @@ public interface EXT_vertex_shader {
void glVariantuivEXT(@GLuint int id, @Check("4") @GLuint IntBuffer pAddr);
void glVariantPointerEXT(@GLuint int id, @AutoType("pAddr") @GLenum int type, @GLuint int stride,
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@GLbyte

View File

@ -53,6 +53,7 @@ public interface EXT_vertex_weighting {
void glVertexWeightfEXT(float weight);
void glVertexWeightPointerEXT(@GLsizei int size, @AutoType("pPointer") @GLenum int type, @GLsizei int stride,
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@Const

View File

@ -754,6 +754,7 @@ public interface GL11 {
void glCopyPixels(int x, int y, int width, int height, int type);
void glColorPointer(int size, @AutoType("pointer") @GLenum int type, @GLsizei int stride,
@CachedReference
@Check
@BufferObject(BufferKind.ArrayVBO)
@Const
@ -785,11 +786,17 @@ public interface GL11 {
void glDisableClientState(@GLenum int cap);
void glEnable(@GLenum int cap);
void glDisable(@GLenum int cap);
void glEdgeFlagPointer(int stride, @BufferObject(BufferKind.ArrayVBO) @Check @Const @GLbyte Buffer pointer);
void glEdgeFlagPointer(int stride,
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@Const
@GLbyte
Buffer pointer);
void glEdgeFlag(boolean flag);
void glDrawPixels(@GLsizei int width, @GLsizei int height, @GLenum int format, @GLenum int type,
@Check("GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, 1)")
@Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)")
@BufferObject(BufferKind.UnpackPBO)
@Const
@GLbyte
@ -898,7 +905,7 @@ public interface GL11 {
void glGetTexImage(@GLenum int target, int level, @GLenum int format, @GLenum int type,
@BufferObject(BufferKind.PackPBO)
@Check("GLBufferChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)")
@Check("GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)")
@GLbyte
@GLshort
@GLint
@ -988,6 +995,7 @@ public interface GL11 {
void glOrtho(double left, double right, double bottom, double top, double zNear, double zFar);
void glNormalPointer(@AutoType("pointer") @GLenum int type, @GLsizei int stride,
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@Const
@ -1007,7 +1015,7 @@ public interface GL11 {
void glShadeModel(@GLenum int mode);
void glSelectBuffer(@AutoSize("buffer") @GLsizei int size, @GLuint IntBuffer buffer);
void glSelectBuffer(@AutoSize("buffer") @GLsizei int size, @CachedReference @GLuint IntBuffer buffer);
void glScissor(int x, int y, @GLsizei int width, @GLsizei int height);
void glScalef(float x, float y, float z);
@ -1018,7 +1026,7 @@ public interface GL11 {
void glReadPixels(int x, int y, @GLsizei int width, @GLsizei int height, @GLenum int format, @GLenum int type,
@BufferObject(BufferKind.PackPBO)
@Check("GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, 1)")
@Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)")
@GLbyte
@GLshort
@GLint
@ -1036,10 +1044,10 @@ public interface GL11 {
void glPushMatrix();
void glPopMatrix();
@Code( " BufferObjectTracker.pushAttrib(mask);")
@Code( " StateTracker.pushAttrib(mask);")
void glPushClientAttrib(@GLbitfield int mask);
@Code( " BufferObjectTracker.popAttrib();")
@Code( " StateTracker.popAttrib();")
void glPopClientAttrib();
void glPushAttrib(@GLbitfield int mask);
@ -1047,6 +1055,7 @@ public interface GL11 {
void glStencilFunc(@GLenum int func, int ref, @GLuint int mask);
void glVertexPointer(int size, @AutoType("pointer") @GLenum int type, @GLsizei int stride,
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@Const
@ -1064,7 +1073,7 @@ public interface GL11 {
void glTexImage1D(@GLenum int target, int level, int internalformat, @GLsizei int width, int border, @GLenum int format, @GLenum int type,
@BufferObject(BufferKind.UnpackPBO)
@Check(value="GLBufferChecks.calculateTexImage1DStorage(pixels, format, type, width, border)", canBeNull=true)
@Check(value="GLChecks.calculateTexImage1DStorage(pixels, format, type, width, border)", canBeNull=true)
@Const
@GLbyte
@GLshort
@ -1074,7 +1083,7 @@ public interface GL11 {
void glTexImage2D(@GLenum int target, int level, int internalformat, int width, int height, int border, @GLenum int format, @GLenum int type,
@BufferObject(BufferKind.UnpackPBO)
@Check(value="GLBufferChecks.calculateTexImage2DStorage(pixels, format, type, width, height, border)", canBeNull=true)
@Check(value="GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height, border)", canBeNull=true)
@Const
@GLbyte
@GLshort
@ -1083,7 +1092,7 @@ public interface GL11 {
Buffer pixels);
void glTexSubImage1D(@GLenum int target, int level, int xoffset, @GLsizei int width, @GLenum int format, @GLenum int type,
@BufferObject(BufferKind.UnpackPBO)
@Check("GLBufferChecks.calculateImageStorage(pixels, format, type, width, 1, 1)")
@Check("GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)")
@Const
@GLbyte
@GLshort
@ -1092,7 +1101,7 @@ public interface GL11 {
Buffer pixels);
void glTexSubImage2D(@GLenum int target, int level, int xoffset, int yoffset, @GLsizei int width, @GLsizei int height, @GLenum int format, @GLenum int type,
@BufferObject(BufferKind.UnpackPBO)
@Check("GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, 1)")
@Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)")
@Const
@GLbyte
@GLshort
@ -1128,7 +1137,12 @@ public interface GL11 {
void glTexEnviv(@GLenum int target, @GLenum int pname, @Check("4") @Const IntBuffer params);
void glTexCoordPointer(int size, @AutoType("pointer") @GLenum int type, @GLsizei int stride,
@BufferObject(BufferKind.ArrayVBO) @Check @Const @GLfloat Buffer pointer);
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@Const
@GLfloat
Buffer pointer);
void glTexCoord1f(float s);
void glTexCoord2f(float s, float t);

View File

@ -99,7 +99,7 @@ public interface GL12 {
void glTexImage3D(@GLenum int target, int level, int internalFormat, @GLsizei int width, @GLsizei int height, @GLsizei int depth, int border, @GLenum int format, @GLenum int type,
@BufferObject(BufferKind.UnpackPBO)
@Check(value="GLBufferChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth, border)", canBeNull=true)
@Check(value="GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth, border)", canBeNull=true)
@Const
@GLbyte
@GLshort
@ -109,7 +109,7 @@ public interface GL12 {
void glTexSubImage3D(@GLenum int target, int level, int xoffset, int yoffset, int zoffset, @GLsizei int width, @GLsizei int height, @GLsizei int depth, @GLenum int format, @GLenum int type,
@BufferObject(BufferKind.UnpackPBO)
@Check("GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, depth)")
@Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)")
@Const
@GLbyte
@GLshort

View File

@ -93,6 +93,7 @@ public interface GL14 {
void glFogCoordf(float coord);
void glFogCoordPointer(@AutoType("data") @GLenum int type, @GLsizei int stride,
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@Const

View File

@ -72,9 +72,9 @@ public interface GL15 {
int GL_BUFFER_MAPPED = 0x88BC;
int GL_BUFFER_MAP_POINTER = 0x88BD;
@Code( " BufferObjectTracker.bindBuffer(target, buffer);")
@Code( " StateTracker.bindBuffer(target, buffer);")
void glBindBuffer(@GLenum int target, @GLuint int buffer);
@Code( " BufferObjectTracker.deleteBuffers(buffers);")
@Code( " StateTracker.deleteBuffers(buffers);")
void glDeleteBuffers(@AutoSize("buffers") @GLsizei int n, @Const @GLuint IntBuffer buffers);
void glGenBuffers(@AutoSize("buffers") @GLsizei int n, @GLuint IntBuffer buffers);

View File

@ -272,6 +272,7 @@ public interface GL20 {
void glVertexAttrib4Nub(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w);
void glVertexAttribPointer(@GLuint int index, int size, @AutoType("buffer") @GLenum int type, boolean normalized, @GLsizei int stride,
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@Const

View File

@ -220,6 +220,7 @@ public interface NV_vertex_program extends NV_program {
void glTrackMatrixNV(@GLenum int target, @GLuint int address, @GLenum int matrix, @GLenum int transform);
void glVertexAttribPointerNV(@GLuint int index, int size, @GLenum int type, @GLsizei int stride,
@CachedReference
@BufferObject(BufferKind.ArrayVBO)
@Check
@Const