diff --git a/build.xml b/build.xml
index 7141c031..27208858 100644
--- a/build.xml
+++ b/build.xml
@@ -206,7 +206,7 @@
-
+
@@ -350,6 +350,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -465,7 +479,7 @@
-
+
diff --git a/src/java/org/lwjgl/opengl/ARBBufferObject.java b/src/java/org/lwjgl/opengl/ARBBufferObject.java
index 2e958b4d..cab0b714 100644
--- a/src/java/org/lwjgl/opengl/ARBBufferObject.java
+++ b/src/java/org/lwjgl/opengl/ARBBufferObject.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ARBDrawBuffers.java b/src/java/org/lwjgl/opengl/ARBDrawBuffers.java
index f1a56fba..f1d9baf6 100644
--- a/src/java/org/lwjgl/opengl/ARBDrawBuffers.java
+++ b/src/java/org/lwjgl/opengl/ARBDrawBuffers.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ARBImaging.java b/src/java/org/lwjgl/opengl/ARBImaging.java
index e3195244..b783e419 100644
--- a/src/java/org/lwjgl/opengl/ARBImaging.java
+++ b/src/java/org/lwjgl/opengl/ARBImaging.java
@@ -89,776 +89,776 @@ public final class ARBImaging {
static native void initNativeStubs() throws LWJGLException;
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position(), span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position(), span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position(), span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position(), span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, FloatBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, FloatBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, FloatBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, FloatBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 1, span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 1, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 1, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 1, span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, FloatBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, FloatBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, FloatBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, FloatBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, FloatBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, FloatBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, FloatBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, FloatBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position(), span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position(), span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position(), span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position(), span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, FloatBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, FloatBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, FloatBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, FloatBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 1, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, ByteBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 1, span, span.position(), function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, FloatBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 1, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, IntBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 1, span, span.position() << 2, function_pointer);
}
public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, ShortBuffer span) {
- GLBufferChecks.ensurePackPBOdisabled();
+ long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
BufferChecks.checkDirect(row);
BufferChecks.checkDirect(column);
BufferChecks.checkDirect(span);
- long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
- BufferChecks.checkFunctionAddress(function_pointer);
nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 1, span, span.position() << 1, function_pointer);
}
private static native void nglGetSeparableFilter(int target, int format, int type, Buffer row, int row_position, Buffer column, int column_position, Buffer span, int span_position, long function_pointer);
public static void glGetSeparableFilter(int target, int format, int type, int row_buffer_offset, int column_buffer_offset, int span_buffer_offset) {
- GLBufferChecks.ensurePackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOenabled();
nglGetSeparableFilterBO(target, format, type, row_buffer_offset, column_buffer_offset, span_buffer_offset, function_pointer);
}
private static native void nglGetSeparableFilterBO(int target, int format, int type, int row_buffer_offset, int column_buffer_offset, int span_buffer_offset, long function_pointer);
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer row, ByteBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position(), column, column.position(), function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer row, FloatBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position(), column, column.position() << 2, function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer row, IntBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position(), column, column.position() << 2, function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer row, ShortBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position(), column, column.position() << 1, function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, FloatBuffer row, ByteBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position(), function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, FloatBuffer row, FloatBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 2, function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, FloatBuffer row, IntBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 2, function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, FloatBuffer row, ShortBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 1, function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer row, ByteBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position(), function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer row, FloatBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 2, function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer row, IntBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 2, function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer row, ShortBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 1, function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer row, ByteBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 1, column, column.position(), function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer row, FloatBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 1, column, column.position() << 2, function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer row, IntBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 1, column, column.position() << 2, function_pointer);
}
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer row, ShortBuffer column) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(row);
- BufferChecks.checkDirect(column);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(row);
+ BufferChecks.checkDirect(column);
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 1, column, column.position() << 1, function_pointer);
}
private static native void nglSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer row, int row_position, Buffer column, int column_position, long function_pointer);
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, int row_buffer_offset, int column_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_imaging_glSeparableFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglSeparableFilter2DBO(target, internalformat, width, height, format, type, row_buffer_offset, column_buffer_offset, function_pointer);
}
private static native void nglSeparableFilter2DBO(int target, int internalformat, int width, int height, int format, int type, int row_buffer_offset, int column_buffer_offset, long function_pointer);
public static void glGetConvolutionParameter(int target, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetConvolutionParameteriv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetConvolutionParameteriv(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetConvolutionParameteriv(int target, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetConvolutionParameter(int target, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetConvolutionParameterfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetConvolutionParameterfv(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetConvolutionParameterfv(int target, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glGetConvolutionFilter(int target, int format, int type, ByteBuffer image) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkDirect(image);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetConvolutionFilter_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkDirect(image);
nglGetConvolutionFilter(target, format, type, image, image.position(), function_pointer);
}
public static void glGetConvolutionFilter(int target, int format, int type, FloatBuffer image) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkDirect(image);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetConvolutionFilter_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkDirect(image);
nglGetConvolutionFilter(target, format, type, image, image.position() << 2, function_pointer);
}
public static void glGetConvolutionFilter(int target, int format, int type, IntBuffer image) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkDirect(image);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetConvolutionFilter_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkDirect(image);
nglGetConvolutionFilter(target, format, type, image, image.position() << 2, function_pointer);
}
public static void glGetConvolutionFilter(int target, int format, int type, ShortBuffer image) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkDirect(image);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetConvolutionFilter_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkDirect(image);
nglGetConvolutionFilter(target, format, type, image, image.position() << 1, function_pointer);
}
private static native void nglGetConvolutionFilter(int target, int format, int type, Buffer image, int image_position, long function_pointer);
public static void glGetConvolutionFilter(int target, int format, int type, int image_buffer_offset) {
- GLBufferChecks.ensurePackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetConvolutionFilter_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOenabled();
nglGetConvolutionFilterBO(target, format, type, image_buffer_offset, function_pointer);
}
private static native void nglGetConvolutionFilterBO(int target, int format, int type, int image_buffer_offset, long function_pointer);
@@ -878,9 +878,9 @@ public final class ARBImaging {
private static native void nglCopyConvolutionFilter1D(int target, int internalformat, int x, int y, int width, long function_pointer);
public static void glConvolutionParameter(int target, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionParameteriv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglConvolutionParameteriv(target, pname, params, params.position(), function_pointer);
}
private static native void nglConvolutionParameteriv(int target, int pname, IntBuffer params, int params_position, long function_pointer);
@@ -893,9 +893,9 @@ public final class ARBImaging {
private static native void nglConvolutionParameteri(int target, int pname, int params, long function_pointer);
public static void glConvolutionParameter(int target, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionParameterfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglConvolutionParameterfv(target, pname, params, params.position(), function_pointer);
}
private static native void nglConvolutionParameterfv(int target, int pname, FloatBuffer params, int params_position, long function_pointer);
@@ -908,121 +908,121 @@ public final class ARBImaging {
private static native void nglConvolutionParameterf(int target, int pname, float params, long function_pointer);
public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer image) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(image, format, type, width, height, 1));
long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, height, 1));
nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position(), function_pointer);
}
public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer image) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(image, format, type, width, height, 1));
long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, height, 1));
nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() << 2, function_pointer);
}
public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer image) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(image, format, type, width, height, 1));
long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, height, 1));
nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() << 1, function_pointer);
}
private static native void nglConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer image, int image_position, long function_pointer);
public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, int image_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglConvolutionFilter2DBO(target, internalformat, width, height, format, type, image_buffer_offset, function_pointer);
}
private static native void nglConvolutionFilter2DBO(int target, int internalformat, int width, int height, int format, int type, int image_buffer_offset, long function_pointer);
public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ByteBuffer image) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(image, format, type, width, 1, 1));
long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, 1, 1));
nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position(), function_pointer);
}
public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, FloatBuffer image) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(image, format, type, width, 1, 1));
long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, 1, 1));
nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position() << 2, function_pointer);
}
public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, IntBuffer image) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(image, format, type, width, 1, 1));
long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, 1, 1));
nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position() << 2, function_pointer);
}
public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ShortBuffer image) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(image, format, type, width, 1, 1));
long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, 1, 1));
nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position() << 1, function_pointer);
}
private static native void nglConvolutionFilter1D(int target, int internalformat, int width, int format, int type, Buffer image, int image_position, long function_pointer);
public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, int image_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_imaging_glConvolutionFilter1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglConvolutionFilter1DBO(target, internalformat, width, format, type, image_buffer_offset, function_pointer);
}
private static native void nglConvolutionFilter1DBO(int target, int internalformat, int width, int format, int type, int image_buffer_offset, long function_pointer);
public static void glGetMinmaxParameter(int target, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmaxParameteriv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetMinmaxParameteriv(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetMinmaxParameteriv(int target, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetMinmaxParameter(int target, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmaxParameterfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetMinmaxParameterfv(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetMinmaxParameterfv(int target, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glGetMinmax(int target, boolean reset, int format, int types, ByteBuffer values) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(values, 4);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmax_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(values, 4);
nglGetMinmax(target, reset, format, types, values, values.position(), function_pointer);
}
public static void glGetMinmax(int target, boolean reset, int format, int types, FloatBuffer values) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(values, 4);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmax_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(values, 4);
nglGetMinmax(target, reset, format, types, values, values.position() << 2, function_pointer);
}
public static void glGetMinmax(int target, boolean reset, int format, int types, IntBuffer values) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(values, 4);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmax_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(values, 4);
nglGetMinmax(target, reset, format, types, values, values.position() << 2, function_pointer);
}
public static void glGetMinmax(int target, boolean reset, int format, int types, ShortBuffer values) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(values, 4);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmax_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(values, 4);
nglGetMinmax(target, reset, format, types, values, values.position() << 1, function_pointer);
}
private static native void nglGetMinmax(int target, boolean reset, int format, int types, Buffer values, int values_position, long function_pointer);
public static void glGetMinmax(int target, boolean reset, int format, int types, int values_buffer_offset) {
- GLBufferChecks.ensurePackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetMinmax_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOenabled();
nglGetMinmaxBO(target, reset, format, types, values_buffer_offset, function_pointer);
}
private static native void nglGetMinmaxBO(int target, boolean reset, int format, int types, int values_buffer_offset, long function_pointer);
@@ -1042,54 +1042,54 @@ public final class ARBImaging {
private static native void nglMinmax(int target, int internalformat, boolean sink, long function_pointer);
public static void glGetHistogramParameter(int target, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 256);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogramParameteriv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 256);
nglGetHistogramParameteriv(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetHistogramParameteriv(int target, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetHistogramParameter(int target, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 256);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogramParameterfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 256);
nglGetHistogramParameterfv(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetHistogramParameterfv(int target, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glGetHistogram(int target, boolean reset, int format, int type, ByteBuffer values) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(values, 256);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogram_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(values, 256);
nglGetHistogram(target, reset, format, type, values, values.position(), function_pointer);
}
public static void glGetHistogram(int target, boolean reset, int format, int type, FloatBuffer values) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(values, 256);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogram_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(values, 256);
nglGetHistogram(target, reset, format, type, values, values.position() << 2, function_pointer);
}
public static void glGetHistogram(int target, boolean reset, int format, int type, IntBuffer values) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(values, 256);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogram_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(values, 256);
nglGetHistogram(target, reset, format, type, values, values.position() << 2, function_pointer);
}
public static void glGetHistogram(int target, boolean reset, int format, int type, ShortBuffer values) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(values, 256);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogram_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(values, 256);
nglGetHistogram(target, reset, format, type, values, values.position() << 1, function_pointer);
}
private static native void nglGetHistogram(int target, boolean reset, int format, int type, Buffer values, int values_position, long function_pointer);
public static void glGetHistogram(int target, boolean reset, int format, int type, int values_buffer_offset) {
- GLBufferChecks.ensurePackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetHistogram_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOenabled();
nglGetHistogramBO(target, reset, format, type, values_buffer_offset, function_pointer);
}
private static native void nglGetHistogramBO(int target, boolean reset, int format, int type, int values_buffer_offset, long function_pointer);
@@ -1123,31 +1123,31 @@ public final class ARBImaging {
private static native void nglBlendEquation(int mode, long function_pointer);
public static void glGetColorTableParameter(int target, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetColorTableParameterfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetColorTableParameterfv(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetColorTableParameterfv(int target, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glGetColorTableParameter(int target, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetColorTableParameteriv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetColorTableParameteriv(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetColorTableParameteriv(int target, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetColorTable(int target, int format, int type, ByteBuffer data) {
- BufferChecks.checkBuffer(data, 256);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetColorTable_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(data, 256);
nglGetColorTable(target, format, type, data, data.position(), function_pointer);
}
public static void glGetColorTable(int target, int format, int type, FloatBuffer data) {
- BufferChecks.checkBuffer(data, 256);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetColorTable_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(data, 256);
nglGetColorTable(target, format, type, data, data.position() << 2, function_pointer);
}
private static native void nglGetColorTable(int target, int format, int type, Buffer data, int data_position, long function_pointer);
@@ -1167,63 +1167,63 @@ public final class ARBImaging {
private static native void nglCopyColorSubTable(int target, int start, int x, int y, int width, long function_pointer);
public static void glColorTableParameter(int target, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorTableParameterfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglColorTableParameterfv(target, pname, params, params.position(), function_pointer);
}
private static native void nglColorTableParameterfv(int target, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glColorTableParameter(int target, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorTableParameteriv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglColorTableParameteriv(target, pname, params, params.position(), function_pointer);
}
private static native void nglColorTableParameteriv(int target, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glColorSubTable(int target, int start, int count, int format, int type, ByteBuffer data) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(data, 256);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorSubTable_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(data, 256);
nglColorSubTable(target, start, count, format, type, data, data.position(), function_pointer);
}
public static void glColorSubTable(int target, int start, int count, int format, int type, FloatBuffer data) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(data, 256);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorSubTable_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(data, 256);
nglColorSubTable(target, start, count, format, type, data, data.position() << 2, function_pointer);
}
private static native void nglColorSubTable(int target, int start, int count, int format, int type, Buffer data, int data_position, long function_pointer);
public static void glColorSubTable(int target, int start, int count, int format, int type, int data_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorSubTable_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglColorSubTableBO(target, start, count, format, type, data_buffer_offset, function_pointer);
}
private static native void nglColorSubTableBO(int target, int start, int count, int format, int type, int data_buffer_offset, long function_pointer);
public static void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(data, 256);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorTable_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(data, 256);
nglColorTable(target, internalFormat, width, format, type, data, data.position(), function_pointer);
}
public static void glColorTable(int target, int internalFormat, int width, int format, int type, FloatBuffer data) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(data, 256);
long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorTable_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(data, 256);
nglColorTable(target, internalFormat, width, format, type, data, data.position() << 2, function_pointer);
}
private static native void nglColorTable(int target, int internalFormat, int width, int format, int type, Buffer data, int data_position, long function_pointer);
public static void glColorTable(int target, int internalFormat, int width, int format, int type, int data_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().ARB_imaging_glColorTable_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglColorTableBO(target, internalFormat, width, format, type, data_buffer_offset, function_pointer);
}
private static native void nglColorTableBO(int target, int internalFormat, int width, int format, int type, int data_buffer_offset, long function_pointer);
diff --git a/src/java/org/lwjgl/opengl/ARBMatrixPalette.java b/src/java/org/lwjgl/opengl/ARBMatrixPalette.java
index cf19bf30..9e54dc28 100644
--- a/src/java/org/lwjgl/opengl/ARBMatrixPalette.java
+++ b/src/java/org/lwjgl/opengl/ARBMatrixPalette.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ARBOcclusionQuery.java b/src/java/org/lwjgl/opengl/ARBOcclusionQuery.java
index 5efe05eb..102d1afc 100644
--- a/src/java/org/lwjgl/opengl/ARBOcclusionQuery.java
+++ b/src/java/org/lwjgl/opengl/ARBOcclusionQuery.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ARBPointParameters.java b/src/java/org/lwjgl/opengl/ARBPointParameters.java
index 7c0734b7..50ef104b 100644
--- a/src/java/org/lwjgl/opengl/ARBPointParameters.java
+++ b/src/java/org/lwjgl/opengl/ARBPointParameters.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ARBProgram.java b/src/java/org/lwjgl/opengl/ARBProgram.java
index 82e428b8..295b28a5 100644
--- a/src/java/org/lwjgl/opengl/ARBProgram.java
+++ b/src/java/org/lwjgl/opengl/ARBProgram.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ARBShaderObjects.java b/src/java/org/lwjgl/opengl/ARBShaderObjects.java
index a19885d2..f33c97b6 100644
--- a/src/java/org/lwjgl/opengl/ARBShaderObjects.java
+++ b/src/java/org/lwjgl/opengl/ARBShaderObjects.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ARBTextureCompression.java b/src/java/org/lwjgl/opengl/ARBTextureCompression.java
index 84b8d8d8..526fad65 100644
--- a/src/java/org/lwjgl/opengl/ARBTextureCompression.java
+++ b/src/java/org/lwjgl/opengl/ARBTextureCompression.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ARBTransposeMatrix.java b/src/java/org/lwjgl/opengl/ARBTransposeMatrix.java
index ea189066..586c2d46 100644
--- a/src/java/org/lwjgl/opengl/ARBTransposeMatrix.java
+++ b/src/java/org/lwjgl/opengl/ARBTransposeMatrix.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ARBVertexBlend.java b/src/java/org/lwjgl/opengl/ARBVertexBlend.java
index ea58136e..c8aa6779 100644
--- a/src/java/org/lwjgl/opengl/ARBVertexBlend.java
+++ b/src/java/org/lwjgl/opengl/ARBVertexBlend.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ARBVertexProgram.java b/src/java/org/lwjgl/opengl/ARBVertexProgram.java
index 6b12efd9..181948cd 100644
--- a/src/java/org/lwjgl/opengl/ARBVertexProgram.java
+++ b/src/java/org/lwjgl/opengl/ARBVertexProgram.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ARBVertexShader.java b/src/java/org/lwjgl/opengl/ARBVertexShader.java
index 11ca1df6..2cff48a4 100644
--- a/src/java/org/lwjgl/opengl/ARBVertexShader.java
+++ b/src/java/org/lwjgl/opengl/ARBVertexShader.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ATIDrawBuffers.java b/src/java/org/lwjgl/opengl/ATIDrawBuffers.java
index c01b829b..c651839c 100644
--- a/src/java/org/lwjgl/opengl/ATIDrawBuffers.java
+++ b/src/java/org/lwjgl/opengl/ATIDrawBuffers.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ATIElementArray.java b/src/java/org/lwjgl/opengl/ATIElementArray.java
index 36b438aa..d9ab1ac6 100644
--- a/src/java/org/lwjgl/opengl/ATIElementArray.java
+++ b/src/java/org/lwjgl/opengl/ATIElementArray.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java b/src/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java
index 3ce56c1a..5fbc334d 100644
--- a/src/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java
+++ b/src/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ATIFragmentShader.java b/src/java/org/lwjgl/opengl/ATIFragmentShader.java
index 73c1e31c..6457a09f 100644
--- a/src/java/org/lwjgl/opengl/ATIFragmentShader.java
+++ b/src/java/org/lwjgl/opengl/ATIFragmentShader.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ATIMapObjectBuffer.java b/src/java/org/lwjgl/opengl/ATIMapObjectBuffer.java
index 9b091a23..b9a192c1 100644
--- a/src/java/org/lwjgl/opengl/ATIMapObjectBuffer.java
+++ b/src/java/org/lwjgl/opengl/ATIMapObjectBuffer.java
@@ -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;
}
diff --git a/src/java/org/lwjgl/opengl/ATIVertexArrayObject.java b/src/java/org/lwjgl/opengl/ATIVertexArrayObject.java
index cf3e49de..d9d85fe1 100644
--- a/src/java/org/lwjgl/opengl/ATIVertexArrayObject.java
+++ b/src/java/org/lwjgl/opengl/ATIVertexArrayObject.java
@@ -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;
}
diff --git a/src/java/org/lwjgl/opengl/ATIVertexAttribArrayObject.java b/src/java/org/lwjgl/opengl/ATIVertexAttribArrayObject.java
index 5e549686..18140deb 100644
--- a/src/java/org/lwjgl/opengl/ATIVertexAttribArrayObject.java
+++ b/src/java/org/lwjgl/opengl/ATIVertexAttribArrayObject.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/ContextCapabilities.java b/src/java/org/lwjgl/opengl/ContextCapabilities.java
index d7229221..237ab55f 100644
--- a/src/java/org/lwjgl/opengl/ContextCapabilities.java
+++ b/src/java/org/lwjgl/opengl/ContextCapabilities.java
@@ -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");
diff --git a/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java b/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java
index 991c665e..3a59c936 100644
--- a/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java
+++ b/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/EXTFogCoord.java b/src/java/org/lwjgl/opengl/EXTFogCoord.java
index dd73dbd5..5c81bdf6 100644
--- a/src/java/org/lwjgl/opengl/EXTFogCoord.java
+++ b/src/java/org/lwjgl/opengl/EXTFogCoord.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/EXTFramebufferObject.java b/src/java/org/lwjgl/opengl/EXTFramebufferObject.java
index 943e7689..77cedccc 100644
--- a/src/java/org/lwjgl/opengl/EXTFramebufferObject.java
+++ b/src/java/org/lwjgl/opengl/EXTFramebufferObject.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/EXTMultiDrawArrays.java b/src/java/org/lwjgl/opengl/EXTMultiDrawArrays.java
index b9a6aca5..a02c1f7a 100644
--- a/src/java/org/lwjgl/opengl/EXTMultiDrawArrays.java
+++ b/src/java/org/lwjgl/opengl/EXTMultiDrawArrays.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/EXTPalettedTexture.java b/src/java/org/lwjgl/opengl/EXTPalettedTexture.java
index 46829c35..92ad7c90 100644
--- a/src/java/org/lwjgl/opengl/EXTPalettedTexture.java
+++ b/src/java/org/lwjgl/opengl/EXTPalettedTexture.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/EXTPointParameters.java b/src/java/org/lwjgl/opengl/EXTPointParameters.java
index cce8368b..dc284824 100644
--- a/src/java/org/lwjgl/opengl/EXTPointParameters.java
+++ b/src/java/org/lwjgl/opengl/EXTPointParameters.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/EXTSecondaryColor.java b/src/java/org/lwjgl/opengl/EXTSecondaryColor.java
index 31f91779..be320a2b 100644
--- a/src/java/org/lwjgl/opengl/EXTSecondaryColor.java
+++ b/src/java/org/lwjgl/opengl/EXTSecondaryColor.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/EXTVertexShader.java b/src/java/org/lwjgl/opengl/EXTVertexShader.java
index a0bd99dc..06672b29 100644
--- a/src/java/org/lwjgl/opengl/EXTVertexShader.java
+++ b/src/java/org/lwjgl/opengl/EXTVertexShader.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/EXTVertexWeighting.java b/src/java/org/lwjgl/opengl/EXTVertexWeighting.java
index c9d43134..d88b113a 100644
--- a/src/java/org/lwjgl/opengl/EXTVertexWeighting.java
+++ b/src/java/org/lwjgl/opengl/EXTVertexWeighting.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/GL11.java b/src/java/org/lwjgl/opengl/GL11.java
index bfb371e7..606fba05 100644
--- a/src/java/org/lwjgl/opengl/GL11.java
+++ b/src/java/org/lwjgl/opengl/GL11.java
@@ -595,33 +595,34 @@ public final class GL11 {
private static native void nglTexCoord1f(float s, long function_pointer);
public static void glTexCoordPointer(int size, int stride, FloatBuffer pointer) {
- GLBufferChecks.ensureArrayVBOdisabled();
- BufferChecks.checkDirect(pointer);
long function_pointer = GLContext.getCapabilities().GL11_glTexCoordPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOdisabled();
+ BufferChecks.checkDirect(pointer);
+ GLChecks.getReferences().GL11_glTexCoordPointer_pointer = pointer;
nglTexCoordPointer(size, GL11.GL_FLOAT, stride, pointer, pointer.position() << 2, function_pointer);
}
private static native void nglTexCoordPointer(int size, int type, int stride, Buffer pointer, int pointer_position, long function_pointer);
public static void glTexCoordPointer(int size, int type, int stride, int pointer_buffer_offset) {
- GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glTexCoordPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOenabled();
nglTexCoordPointerBO(size, type, stride, pointer_buffer_offset, function_pointer);
}
private static native void nglTexCoordPointerBO(int size, int type, int stride, int pointer_buffer_offset, long function_pointer);
public static void glTexEnv(int target, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glTexEnviv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglTexEnviv(target, pname, params, params.position(), function_pointer);
}
private static native void nglTexEnviv(int target, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glTexEnv(int target, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glTexEnvfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglTexEnvfv(target, pname, params, params.position(), function_pointer);
}
private static native void nglTexEnvfv(int target, int pname, FloatBuffer params, int params_position, long function_pointer);
@@ -641,9 +642,9 @@ public final class GL11 {
private static native void nglTexEnvf(int target, int pname, float param, long function_pointer);
public static void glTexGen(int coord, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glTexGeniv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglTexGeniv(coord, pname, params, params.position(), function_pointer);
}
private static native void nglTexGeniv(int coord, int pname, IntBuffer params, int params_position, long function_pointer);
@@ -656,9 +657,9 @@ public final class GL11 {
private static native void nglTexGeni(int coord, int pname, int param, long function_pointer);
public static void glTexGen(int coord, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glTexGenfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglTexGenfv(coord, pname, params, params.position(), function_pointer);
}
private static native void nglTexGenfv(int coord, int pname, FloatBuffer params, int params_position, long function_pointer);
@@ -671,17 +672,17 @@ public final class GL11 {
private static native void nglTexGenf(int coord, int pname, float param, long function_pointer);
public static void glTexParameter(int target, int pname, IntBuffer param) {
- BufferChecks.checkBuffer(param, 4);
long function_pointer = GLContext.getCapabilities().GL11_glTexParameteriv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(param, 4);
nglTexParameteriv(target, pname, param, param.position(), function_pointer);
}
private static native void nglTexParameteriv(int target, int pname, IntBuffer param, int param_position, long function_pointer);
public static void glTexParameter(int target, int pname, FloatBuffer param) {
- BufferChecks.checkBuffer(param, 4);
long function_pointer = GLContext.getCapabilities().GL11_glTexParameterfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(param, 4);
nglTexParameterfv(target, pname, param, param.position(), function_pointer);
}
private static native void nglTexParameterfv(int target, int pname, FloatBuffer param, int param_position, long function_pointer);
@@ -701,157 +702,157 @@ public final class GL11 {
private static native void nglTexParameterf(int target, int pname, float param, long function_pointer);
public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, 1));
long function_pointer = GLContext.getCapabilities().GL11_glTexSubImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1));
nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position(), function_pointer);
}
public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, FloatBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, 1));
long function_pointer = GLContext.getCapabilities().GL11_glTexSubImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1));
nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position() << 2, function_pointer);
}
public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, 1));
long function_pointer = GLContext.getCapabilities().GL11_glTexSubImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1));
nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position() << 2, function_pointer);
}
public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ShortBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, 1));
long function_pointer = GLContext.getCapabilities().GL11_glTexSubImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1));
nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position() << 1, function_pointer);
}
private static native void nglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, Buffer pixels, int pixels_position, long function_pointer);
public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, int pixels_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glTexSubImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglTexSubImage2DBO(target, level, xoffset, yoffset, width, height, format, type, pixels_buffer_offset, function_pointer);
}
private static native void nglTexSubImage2DBO(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, int pixels_buffer_offset, long function_pointer);
public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, ByteBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, 1, 1));
long function_pointer = GLContext.getCapabilities().GL11_glTexSubImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1));
nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position(), function_pointer);
}
public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, FloatBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, 1, 1));
long function_pointer = GLContext.getCapabilities().GL11_glTexSubImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1));
nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position() << 2, function_pointer);
}
public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, IntBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, 1, 1));
long function_pointer = GLContext.getCapabilities().GL11_glTexSubImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1));
nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position() << 2, function_pointer);
}
public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, ShortBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, 1, 1));
long function_pointer = GLContext.getCapabilities().GL11_glTexSubImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1));
nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position() << 1, function_pointer);
}
private static native void nglTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, Buffer pixels, int pixels_position, long function_pointer);
public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, int pixels_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glTexSubImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglTexSubImage1DBO(target, level, xoffset, width, format, type, pixels_buffer_offset, function_pointer);
}
private static native void nglTexSubImage1DBO(int target, int level, int xoffset, int width, int format, int type, int pixels_buffer_offset, long function_pointer);
public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- if (pixels != null)
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage2DStorage(pixels, format, type, width, height, border));
long function_pointer = GLContext.getCapabilities().GL11_glTexImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ if (pixels != null)
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height, border));
nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels != null ? pixels.position() : 0, function_pointer);
}
public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, FloatBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- if (pixels != null)
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage2DStorage(pixels, format, type, width, height, border));
long function_pointer = GLContext.getCapabilities().GL11_glTexImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ if (pixels != null)
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height, border));
nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0, function_pointer);
}
public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- if (pixels != null)
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage2DStorage(pixels, format, type, width, height, border));
long function_pointer = GLContext.getCapabilities().GL11_glTexImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ if (pixels != null)
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height, border));
nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0, function_pointer);
}
public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ShortBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- if (pixels != null)
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage2DStorage(pixels, format, type, width, height, border));
long function_pointer = GLContext.getCapabilities().GL11_glTexImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ if (pixels != null)
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height, border));
nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels != null ? pixels.position() << 1 : 0, function_pointer);
}
private static native void nglTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, Buffer pixels, int pixels_position, long function_pointer);
public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, int pixels_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glTexImage2D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglTexImage2DBO(target, level, internalformat, width, height, border, format, type, pixels_buffer_offset, function_pointer);
}
private static native void nglTexImage2DBO(int target, int level, int internalformat, int width, int height, int border, int format, int type, int pixels_buffer_offset, long function_pointer);
public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ByteBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- if (pixels != null)
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage1DStorage(pixels, format, type, width, border));
long function_pointer = GLContext.getCapabilities().GL11_glTexImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ if (pixels != null)
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width, border));
nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels != null ? pixels.position() : 0, function_pointer);
}
public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, FloatBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- if (pixels != null)
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage1DStorage(pixels, format, type, width, border));
long function_pointer = GLContext.getCapabilities().GL11_glTexImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ if (pixels != null)
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width, border));
nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0, function_pointer);
}
public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, IntBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- if (pixels != null)
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage1DStorage(pixels, format, type, width, border));
long function_pointer = GLContext.getCapabilities().GL11_glTexImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ if (pixels != null)
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width, border));
nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0, function_pointer);
}
public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ShortBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- if (pixels != null)
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage1DStorage(pixels, format, type, width, border));
long function_pointer = GLContext.getCapabilities().GL11_glTexImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ if (pixels != null)
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width, border));
nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels != null ? pixels.position() << 1 : 0, function_pointer);
}
private static native void nglTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, Buffer pixels, int pixels_position, long function_pointer);
public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, int pixels_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glTexImage1D_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglTexImage1DBO(target, level, internalformat, width, border, format, type, pixels_buffer_offset, function_pointer);
}
private static native void nglTexImage1DBO(int target, int level, int internalformat, int width, int border, int format, int type, int pixels_buffer_offset, long function_pointer);
@@ -906,24 +907,26 @@ public final class GL11 {
private static native void nglVertex2f(float x, float y, long function_pointer);
public static void glVertexPointer(int size, int stride, FloatBuffer pointer) {
- GLBufferChecks.ensureArrayVBOdisabled();
- BufferChecks.checkDirect(pointer);
long function_pointer = GLContext.getCapabilities().GL11_glVertexPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOdisabled();
+ BufferChecks.checkDirect(pointer);
+ GLChecks.getReferences().GL11_glVertexPointer_pointer = pointer;
nglVertexPointer(size, GL11.GL_FLOAT, stride, pointer, pointer.position() << 2, function_pointer);
}
public static void glVertexPointer(int size, int stride, IntBuffer pointer) {
- GLBufferChecks.ensureArrayVBOdisabled();
- BufferChecks.checkDirect(pointer);
long function_pointer = GLContext.getCapabilities().GL11_glVertexPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOdisabled();
+ BufferChecks.checkDirect(pointer);
+ GLChecks.getReferences().GL11_glVertexPointer_pointer = pointer;
nglVertexPointer(size, GL11.GL_INT, stride, pointer, pointer.position() << 2, function_pointer);
}
private static native void nglVertexPointer(int size, int type, int stride, Buffer pointer, int pointer_position, long function_pointer);
public static void glVertexPointer(int size, int type, int stride, int pointer_buffer_offset) {
- GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glVertexPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOenabled();
nglVertexPointerBO(size, type, stride, pointer_buffer_offset, function_pointer);
}
private static native void nglVertexPointerBO(int size, int type, int stride, int pointer_buffer_offset, long function_pointer);
@@ -950,7 +953,7 @@ public final class GL11 {
private static native void nglPushAttrib(int mask, long function_pointer);
public static void glPopClientAttrib() {
- BufferObjectTracker.popAttrib();
+ StateTracker.popAttrib();
long function_pointer = GLContext.getCapabilities().GL11_glPopClientAttrib_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglPopClientAttrib(function_pointer);
@@ -958,7 +961,7 @@ public final class GL11 {
private static native void nglPopClientAttrib(long function_pointer);
public static void glPushClientAttrib(int mask) {
- BufferObjectTracker.pushAttrib(mask);
+ StateTracker.pushAttrib(mask);
long function_pointer = GLContext.getCapabilities().GL11_glPushClientAttrib_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
nglPushClientAttrib(mask, function_pointer);
@@ -1043,31 +1046,31 @@ public final class GL11 {
private static native void nglReadBuffer(int mode, long function_pointer);
public static void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, 1));
long function_pointer = GLContext.getCapabilities().GL11_glReadPixels_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1));
nglReadPixels(x, y, width, height, format, type, pixels, pixels.position(), function_pointer);
}
public static void glReadPixels(int x, int y, int width, int height, int format, int type, IntBuffer pixels) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, 1));
long function_pointer = GLContext.getCapabilities().GL11_glReadPixels_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1));
nglReadPixels(x, y, width, height, format, type, pixels, pixels.position() << 2, function_pointer);
}
public static void glReadPixels(int x, int y, int width, int height, int format, int type, ShortBuffer pixels) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, 1));
long function_pointer = GLContext.getCapabilities().GL11_glReadPixels_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1));
nglReadPixels(x, y, width, height, format, type, pixels, pixels.position() << 1, function_pointer);
}
private static native void nglReadPixels(int x, int y, int width, int height, int format, int type, Buffer pixels, int pixels_position, long function_pointer);
public static void glReadPixels(int x, int y, int width, int height, int format, int type, int pixels_buffer_offset) {
- GLBufferChecks.ensurePackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glReadPixels_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOenabled();
nglReadPixelsBO(x, y, width, height, format, type, pixels_buffer_offset, function_pointer);
}
private static native void nglReadPixelsBO(int x, int y, int width, int height, int format, int type, int pixels_buffer_offset, long function_pointer);
@@ -1116,9 +1119,10 @@ public final class GL11 {
private static native void nglScissor(int x, int y, int width, int height, long function_pointer);
public static void glSelectBuffer(IntBuffer buffer) {
- BufferChecks.checkDirect(buffer);
long function_pointer = GLContext.getCapabilities().GL11_glSelectBuffer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkDirect(buffer);
+ GLChecks.getReferences().GL11_glSelectBuffer_buffer = buffer;
nglSelectBuffer((buffer.remaining()), buffer, buffer.position(), function_pointer);
}
private static native void nglSelectBuffer(int size, IntBuffer buffer, int buffer_position, long function_pointer);
@@ -1131,9 +1135,9 @@ public final class GL11 {
private static native void nglShadeModel(int mode, long function_pointer);
public static void glMultMatrix(FloatBuffer m) {
- BufferChecks.checkBuffer(m, 16);
long function_pointer = GLContext.getCapabilities().GL11_glMultMatrixf_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(m, 16);
nglMultMatrixf(m, m.position(), function_pointer);
}
private static native void nglMultMatrixf(FloatBuffer m, int m_position, long function_pointer);
@@ -1174,31 +1178,34 @@ public final class GL11 {
private static native void nglNormal3b(byte nx, byte ny, byte nz, long function_pointer);
public static void glNormalPointer(int stride, ByteBuffer pointer) {
- GLBufferChecks.ensureArrayVBOdisabled();
- BufferChecks.checkDirect(pointer);
long function_pointer = GLContext.getCapabilities().GL11_glNormalPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOdisabled();
+ BufferChecks.checkDirect(pointer);
+ GLChecks.getReferences().GL11_glNormalPointer_pointer = pointer;
nglNormalPointer(GL11.GL_BYTE, stride, pointer, pointer.position(), function_pointer);
}
public static void glNormalPointer(int stride, FloatBuffer pointer) {
- GLBufferChecks.ensureArrayVBOdisabled();
- BufferChecks.checkDirect(pointer);
long function_pointer = GLContext.getCapabilities().GL11_glNormalPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOdisabled();
+ BufferChecks.checkDirect(pointer);
+ GLChecks.getReferences().GL11_glNormalPointer_pointer = pointer;
nglNormalPointer(GL11.GL_FLOAT, stride, pointer, pointer.position() << 2, function_pointer);
}
public static void glNormalPointer(int stride, IntBuffer pointer) {
- GLBufferChecks.ensureArrayVBOdisabled();
- BufferChecks.checkDirect(pointer);
long function_pointer = GLContext.getCapabilities().GL11_glNormalPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOdisabled();
+ BufferChecks.checkDirect(pointer);
+ GLChecks.getReferences().GL11_glNormalPointer_pointer = pointer;
nglNormalPointer(GL11.GL_INT, stride, pointer, pointer.position() << 2, function_pointer);
}
private static native void nglNormalPointer(int type, int stride, Buffer pointer, int pointer_position, long function_pointer);
public static void glNormalPointer(int type, int stride, int pointer_buffer_offset) {
- GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glNormalPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOenabled();
nglNormalPointerBO(type, stride, pointer_buffer_offset, function_pointer);
}
private static native void nglNormalPointerBO(int type, int stride, int pointer_buffer_offset, long function_pointer);
@@ -1218,49 +1225,49 @@ public final class GL11 {
private static native void nglPassThrough(float token, long function_pointer);
public static void glPixelMapu(int map, ShortBuffer values) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().GL11_glPixelMapusv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(values);
nglPixelMapusv(map, (values.remaining()), values, values.position(), function_pointer);
}
private static native void nglPixelMapusv(int map, int mapsize, ShortBuffer values, int values_position, long function_pointer);
public static void glPixelMapusv(int map, int mapsize, int values_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glPixelMapusv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglPixelMapusvBO(map, mapsize, values_buffer_offset, function_pointer);
}
private static native void nglPixelMapusvBO(int map, int mapsize, int values_buffer_offset, long function_pointer);
public static void glPixelMapu(int map, IntBuffer values) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().GL11_glPixelMapuiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(values);
nglPixelMapuiv(map, (values.remaining()), values, values.position(), function_pointer);
}
private static native void nglPixelMapuiv(int map, int mapsize, IntBuffer values, int values_position, long function_pointer);
public static void glPixelMapuiv(int map, int mapsize, int values_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glPixelMapuiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglPixelMapuivBO(map, mapsize, values_buffer_offset, function_pointer);
}
private static native void nglPixelMapuivBO(int map, int mapsize, int values_buffer_offset, long function_pointer);
public static void glPixelMap(int map, FloatBuffer values) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkDirect(values);
long function_pointer = GLContext.getCapabilities().GL11_glPixelMapfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkDirect(values);
nglPixelMapfv(map, (values.remaining()), values, values.position(), function_pointer);
}
private static native void nglPixelMapfv(int map, int mapsize, FloatBuffer values, int values_position, long function_pointer);
public static void glPixelMapfv(int map, int mapsize, int values_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glPixelMapfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglPixelMapfvBO(map, mapsize, values_buffer_offset, function_pointer);
}
private static native void nglPixelMapfvBO(int map, int mapsize, int values_buffer_offset, long function_pointer);
@@ -1322,17 +1329,17 @@ public final class GL11 {
private static native void nglPolygonOffset(float factor, float units, long function_pointer);
public static void glPolygonStipple(ByteBuffer mask) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(mask, 1024);
long function_pointer = GLContext.getCapabilities().GL11_glPolygonStipple_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(mask, 1024);
nglPolygonStipple(mask, mask.position(), function_pointer);
}
private static native void nglPolygonStipple(ByteBuffer mask, int mask_position, long function_pointer);
public static void glPolygonStipple(int mask_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glPolygonStipple_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglPolygonStippleBO(mask_buffer_offset, function_pointer);
}
private static native void nglPolygonStippleBO(int mask_buffer_offset, long function_pointer);
@@ -1353,17 +1360,17 @@ public final class GL11 {
private static native boolean nglIsTexture(int texture, long function_pointer);
public static void glLight(int light, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glLightiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglLightiv(light, pname, params, params.position(), function_pointer);
}
private static native void nglLightiv(int light, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glLight(int light, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glLightfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglLightfv(light, pname, params, params.position(), function_pointer);
}
private static native void nglLightfv(int light, int pname, FloatBuffer params, int params_position, long function_pointer);
@@ -1383,17 +1390,17 @@ public final class GL11 {
private static native void nglLightf(int light, int pname, float param, long function_pointer);
public static void glLightModel(int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glLightModeliv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglLightModeliv(pname, params, params.position(), function_pointer);
}
private static native void nglLightModeliv(int pname, IntBuffer params, int params_position, long function_pointer);
public static void glLightModel(int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glLightModelfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglLightModelfv(pname, params, params.position(), function_pointer);
}
private static native void nglLightModelfv(int pname, FloatBuffer params, int params_position, long function_pointer);
@@ -1441,9 +1448,9 @@ public final class GL11 {
private static native void nglLoadIdentity(long function_pointer);
public static void glLoadMatrix(FloatBuffer m) {
- BufferChecks.checkBuffer(m, 16);
long function_pointer = GLContext.getCapabilities().GL11_glLoadMatrixf_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(m, 16);
nglLoadMatrixf(m, m.position(), function_pointer);
}
private static native void nglLoadMatrixf(FloatBuffer m, int m_position, long function_pointer);
@@ -1463,17 +1470,17 @@ public final class GL11 {
private static native void nglLogicOp(int opcode, long function_pointer);
public static void glMap1f(int target, float u1, float u2, int stride, int order, FloatBuffer points) {
- BufferChecks.checkDirect(points);
long function_pointer = GLContext.getCapabilities().GL11_glMap1f_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkDirect(points);
nglMap1f(target, u1, u2, stride, order, points, points.position(), function_pointer);
}
private static native void nglMap1f(int target, float u1, float u2, int stride, int order, FloatBuffer points, int points_position, long function_pointer);
public static void glMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, FloatBuffer points) {
- BufferChecks.checkDirect(points);
long function_pointer = GLContext.getCapabilities().GL11_glMap2f_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkDirect(points);
nglMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points, points.position(), function_pointer);
}
private static native void nglMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, FloatBuffer points, int points_position, long function_pointer);
@@ -1493,17 +1500,17 @@ public final class GL11 {
private static native void nglMapGrid1f(int un, float u1, float u2, long function_pointer);
public static void glMaterial(int face, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glMaterialiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglMaterialiv(face, pname, params, params.position(), function_pointer);
}
private static native void nglMaterialiv(int face, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glMaterial(int face, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glMaterialfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglMaterialfv(face, pname, params, params.position(), function_pointer);
}
private static native void nglMaterialfv(int face, int pname, FloatBuffer params, int params_position, long function_pointer);
@@ -1531,17 +1538,17 @@ public final class GL11 {
private static native boolean nglIsList(int list, long function_pointer);
public static void glGetPolygonStipple(ByteBuffer mask) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(mask, 1024);
long function_pointer = GLContext.getCapabilities().GL11_glGetPolygonStipple_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(mask, 1024);
nglGetPolygonStipple(mask, mask.position(), function_pointer);
}
private static native void nglGetPolygonStipple(ByteBuffer mask, int mask_position, long function_pointer);
public static void glGetPolygonStipple(int mask_buffer_offset) {
- GLBufferChecks.ensurePackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glGetPolygonStipple_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOenabled();
nglGetPolygonStippleBO(mask_buffer_offset, function_pointer);
}
private static native void nglGetPolygonStippleBO(int mask_buffer_offset, long function_pointer);
@@ -1555,95 +1562,95 @@ public final class GL11 {
private static native java.lang.String nglGetString(int name, long function_pointer);
public static void glGetTexEnv(int coord, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glGetTexEnvfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetTexEnvfv(coord, pname, params, params.position(), function_pointer);
}
private static native void nglGetTexEnvfv(int coord, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glGetTexEnv(int coord, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glGetTexEnviv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetTexEnviv(coord, pname, params, params.position(), function_pointer);
}
private static native void nglGetTexEnviv(int coord, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetTexGen(int coord, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glGetTexGenfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetTexGenfv(coord, pname, params, params.position(), function_pointer);
}
private static native void nglGetTexGenfv(int coord, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glGetTexGen(int coord, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glGetTexGeniv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetTexGeniv(coord, pname, params, params.position(), function_pointer);
}
private static native void nglGetTexGeniv(int coord, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetTexImage(int target, int level, int format, int type, ByteBuffer pixels) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, 1, 1, 1));
long function_pointer = GLContext.getCapabilities().GL11_glGetTexImage_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1));
nglGetTexImage(target, level, format, type, pixels, pixels.position(), function_pointer);
}
public static void glGetTexImage(int target, int level, int format, int type, IntBuffer pixels) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, 1, 1, 1));
long function_pointer = GLContext.getCapabilities().GL11_glGetTexImage_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1));
nglGetTexImage(target, level, format, type, pixels, pixels.position() << 2, function_pointer);
}
public static void glGetTexImage(int target, int level, int format, int type, ShortBuffer pixels) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, 1, 1, 1));
long function_pointer = GLContext.getCapabilities().GL11_glGetTexImage_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1));
nglGetTexImage(target, level, format, type, pixels, pixels.position() << 1, function_pointer);
}
private static native void nglGetTexImage(int target, int level, int format, int type, Buffer pixels, int pixels_position, long function_pointer);
public static void glGetTexImage(int target, int level, int format, int type, int pixels_buffer_offset) {
- GLBufferChecks.ensurePackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glGetTexImage_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOenabled();
nglGetTexImageBO(target, level, format, type, pixels_buffer_offset, function_pointer);
}
private static native void nglGetTexImageBO(int target, int level, int format, int type, int pixels_buffer_offset, long function_pointer);
public static void glGetTexLevelParameter(int target, int level, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glGetTexLevelParameteriv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetTexLevelParameteriv(target, level, pname, params, params.position(), function_pointer);
}
private static native void nglGetTexLevelParameteriv(int target, int level, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetTexLevelParameter(int target, int level, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glGetTexLevelParameterfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetTexLevelParameterfv(target, level, pname, params, params.position(), function_pointer);
}
private static native void nglGetTexLevelParameterfv(int target, int level, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glGetTexParameter(int target, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glGetTexParameteriv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetTexParameteriv(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetTexParameteriv(int target, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetTexParameter(int target, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glGetTexParameterfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetTexParameterfv(target, pname, params, params.position(), function_pointer);
}
private static native void nglGetTexParameterfv(int target, int pname, FloatBuffer params, int params_position, long function_pointer);
@@ -1663,38 +1670,38 @@ public final class GL11 {
private static native void nglInitNames(long function_pointer);
public static void glInterleavedArrays(int format, int stride, ByteBuffer pointer) {
- GLBufferChecks.ensureArrayVBOdisabled();
- BufferChecks.checkDirect(pointer);
long function_pointer = GLContext.getCapabilities().GL11_glInterleavedArrays_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOdisabled();
+ BufferChecks.checkDirect(pointer);
nglInterleavedArrays(format, stride, pointer, pointer.position(), function_pointer);
}
public static void glInterleavedArrays(int format, int stride, FloatBuffer pointer) {
- GLBufferChecks.ensureArrayVBOdisabled();
- BufferChecks.checkDirect(pointer);
long function_pointer = GLContext.getCapabilities().GL11_glInterleavedArrays_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOdisabled();
+ BufferChecks.checkDirect(pointer);
nglInterleavedArrays(format, stride, pointer, pointer.position() << 2, function_pointer);
}
public static void glInterleavedArrays(int format, int stride, IntBuffer pointer) {
- GLBufferChecks.ensureArrayVBOdisabled();
- BufferChecks.checkDirect(pointer);
long function_pointer = GLContext.getCapabilities().GL11_glInterleavedArrays_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOdisabled();
+ BufferChecks.checkDirect(pointer);
nglInterleavedArrays(format, stride, pointer, pointer.position() << 2, function_pointer);
}
public static void glInterleavedArrays(int format, int stride, ShortBuffer pointer) {
- GLBufferChecks.ensureArrayVBOdisabled();
- BufferChecks.checkDirect(pointer);
long function_pointer = GLContext.getCapabilities().GL11_glInterleavedArrays_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOdisabled();
+ BufferChecks.checkDirect(pointer);
nglInterleavedArrays(format, stride, pointer, pointer.position() << 1, function_pointer);
}
private static native void nglInterleavedArrays(int format, int stride, Buffer pointer, int pointer_position, long function_pointer);
public static void glInterleavedArrays(int format, int stride, int pointer_buffer_offset) {
- GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glInterleavedArrays_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOenabled();
nglInterleavedArraysBO(format, stride, pointer_buffer_offset, function_pointer);
}
private static native void nglInterleavedArraysBO(int format, int stride, int pointer_buffer_offset, long function_pointer);
@@ -1730,17 +1737,17 @@ public final class GL11 {
private static native void nglFlush(long function_pointer);
public static void glFog(int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glFogiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglFogiv(pname, params, params.position(), function_pointer);
}
private static native void nglFogiv(int pname, IntBuffer params, int params_position, long function_pointer);
public static void glFog(int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glFogfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglFogfv(pname, params, params.position(), function_pointer);
}
private static native void nglFogfv(int pname, FloatBuffer params, int params_position, long function_pointer);
@@ -1782,49 +1789,49 @@ public final class GL11 {
private static native int nglGenLists(int range, long function_pointer);
public static void glGenTextures(IntBuffer textures) {
- BufferChecks.checkDirect(textures);
long function_pointer = GLContext.getCapabilities().GL11_glGenTextures_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkDirect(textures);
nglGenTextures((textures.remaining()), textures, textures.position(), function_pointer);
}
private static native void nglGenTextures(int n, IntBuffer textures, int textures_position, long function_pointer);
public static void glGetInteger(int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 16);
long function_pointer = GLContext.getCapabilities().GL11_glGetIntegerv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 16);
nglGetIntegerv(pname, params, params.position(), function_pointer);
}
private static native void nglGetIntegerv(int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetFloat(int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 16);
long function_pointer = GLContext.getCapabilities().GL11_glGetFloatv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 16);
nglGetFloatv(pname, params, params.position(), function_pointer);
}
private static native void nglGetFloatv(int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glGetDouble(int pname, DoubleBuffer params) {
- BufferChecks.checkBuffer(params, 16);
long function_pointer = GLContext.getCapabilities().GL11_glGetDoublev_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 16);
nglGetDoublev(pname, params, params.position(), function_pointer);
}
private static native void nglGetDoublev(int pname, DoubleBuffer params, int params_position, long function_pointer);
public static void glGetBoolean(int pname, ByteBuffer params) {
- BufferChecks.checkBuffer(params, 16);
long function_pointer = GLContext.getCapabilities().GL11_glGetBooleanv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 16);
nglGetBooleanv(pname, params, params.position(), function_pointer);
}
private static native void nglGetBooleanv(int pname, ByteBuffer params, int params_position, long function_pointer);
public static void glGetClipPlane(int plane, DoubleBuffer equation) {
- BufferChecks.checkBuffer(equation, 4);
long function_pointer = GLContext.getCapabilities().GL11_glGetClipPlane_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(equation, 4);
nglGetClipPlane(plane, equation, equation.position(), function_pointer);
}
private static native void nglGetClipPlane(int plane, DoubleBuffer equation, int equation_position, long function_pointer);
@@ -1838,105 +1845,105 @@ public final class GL11 {
private static native int nglGetError(long function_pointer);
public static void glGetLight(int light, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glGetLightiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetLightiv(light, pname, params, params.position(), function_pointer);
}
private static native void nglGetLightiv(int light, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetLight(int light, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glGetLightfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetLightfv(light, pname, params, params.position(), function_pointer);
}
private static native void nglGetLightfv(int light, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glGetMap(int target, int query, IntBuffer v) {
- BufferChecks.checkBuffer(v, 256);
long function_pointer = GLContext.getCapabilities().GL11_glGetMapiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(v, 256);
nglGetMapiv(target, query, v, v.position(), function_pointer);
}
private static native void nglGetMapiv(int target, int query, IntBuffer v, int v_position, long function_pointer);
public static void glGetMap(int target, int query, FloatBuffer v) {
- BufferChecks.checkBuffer(v, 256);
long function_pointer = GLContext.getCapabilities().GL11_glGetMapfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(v, 256);
nglGetMapfv(target, query, v, v.position(), function_pointer);
}
private static native void nglGetMapfv(int target, int query, FloatBuffer v, int v_position, long function_pointer);
public static void glGetMaterial(int face, int pname, IntBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glGetMaterialiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetMaterialiv(face, pname, params, params.position(), function_pointer);
}
private static native void nglGetMaterialiv(int face, int pname, IntBuffer params, int params_position, long function_pointer);
public static void glGetMaterial(int face, int pname, FloatBuffer params) {
- BufferChecks.checkBuffer(params, 4);
long function_pointer = GLContext.getCapabilities().GL11_glGetMaterialfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, 4);
nglGetMaterialfv(face, pname, params, params.position(), function_pointer);
}
private static native void nglGetMaterialfv(int face, int pname, FloatBuffer params, int params_position, long function_pointer);
public static void glGetPixelMapu(int map, ShortBuffer values) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(values, 256);
long function_pointer = GLContext.getCapabilities().GL11_glGetPixelMapusv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(values, 256);
nglGetPixelMapusv(map, values, values.position(), function_pointer);
}
private static native void nglGetPixelMapusv(int map, ShortBuffer values, int values_position, long function_pointer);
public static void glGetPixelMapusv(int map, int values_buffer_offset) {
- GLBufferChecks.ensurePackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glGetPixelMapusv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOenabled();
nglGetPixelMapusvBO(map, values_buffer_offset, function_pointer);
}
private static native void nglGetPixelMapusvBO(int map, int values_buffer_offset, long function_pointer);
public static void glGetPixelMapu(int map, IntBuffer values) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(values, 256);
long function_pointer = GLContext.getCapabilities().GL11_glGetPixelMapuiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(values, 256);
nglGetPixelMapuiv(map, values, values.position(), function_pointer);
}
private static native void nglGetPixelMapuiv(int map, IntBuffer values, int values_position, long function_pointer);
public static void glGetPixelMapuiv(int map, int values_buffer_offset) {
- GLBufferChecks.ensurePackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glGetPixelMapuiv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOenabled();
nglGetPixelMapuivBO(map, values_buffer_offset, function_pointer);
}
private static native void nglGetPixelMapuivBO(int map, int values_buffer_offset, long function_pointer);
public static void glGetPixelMap(int map, FloatBuffer values) {
- GLBufferChecks.ensurePackPBOdisabled();
- BufferChecks.checkBuffer(values, 256);
long function_pointer = GLContext.getCapabilities().GL11_glGetPixelMapfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOdisabled();
+ BufferChecks.checkBuffer(values, 256);
nglGetPixelMapfv(map, values, values.position(), function_pointer);
}
private static native void nglGetPixelMapfv(int map, FloatBuffer values, int values_position, long function_pointer);
public static void glGetPixelMapfv(int map, int values_buffer_offset) {
- GLBufferChecks.ensurePackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glGetPixelMapfv_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensurePackPBOenabled();
nglGetPixelMapfvBO(map, values_buffer_offset, function_pointer);
}
private static native void nglGetPixelMapfvBO(int map, int values_buffer_offset, long function_pointer);
public static void glFeedbackBuffer(int type, FloatBuffer buffer) {
- BufferChecks.checkDirect(buffer);
long function_pointer = GLContext.getCapabilities().GL11_glFeedbackBuffer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkDirect(buffer);
nglFeedbackBuffer((buffer.remaining()), type, buffer, buffer.position(), function_pointer);
}
private static native void nglFeedbackBuffer(int size, int type, FloatBuffer buffer, int buffer_position, long function_pointer);
@@ -1977,61 +1984,61 @@ public final class GL11 {
private static native void nglDrawBuffer(int mode, long function_pointer);
public static void glDrawElements(int mode, ByteBuffer indices) {
- GLBufferChecks.ensureElementVBOdisabled();
- BufferChecks.checkDirect(indices);
long function_pointer = GLContext.getCapabilities().GL11_glDrawElements_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureElementVBOdisabled();
+ BufferChecks.checkDirect(indices);
nglDrawElements(mode, (indices.remaining()), GL11.GL_UNSIGNED_BYTE, indices, indices.position(), function_pointer);
}
public static void glDrawElements(int mode, IntBuffer indices) {
- GLBufferChecks.ensureElementVBOdisabled();
- BufferChecks.checkDirect(indices);
long function_pointer = GLContext.getCapabilities().GL11_glDrawElements_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureElementVBOdisabled();
+ BufferChecks.checkDirect(indices);
nglDrawElements(mode, (indices.remaining()), GL11.GL_UNSIGNED_INT, indices, indices.position() << 2, function_pointer);
}
public static void glDrawElements(int mode, ShortBuffer indices) {
- GLBufferChecks.ensureElementVBOdisabled();
- BufferChecks.checkDirect(indices);
long function_pointer = GLContext.getCapabilities().GL11_glDrawElements_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureElementVBOdisabled();
+ BufferChecks.checkDirect(indices);
nglDrawElements(mode, (indices.remaining()), GL11.GL_UNSIGNED_SHORT, indices, indices.position() << 1, function_pointer);
}
private static native void nglDrawElements(int mode, int count, int type, Buffer indices, int indices_position, long function_pointer);
public static void glDrawElements(int mode, int count, int type, int indices_buffer_offset) {
- GLBufferChecks.ensureElementVBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glDrawElements_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureElementVBOenabled();
nglDrawElementsBO(mode, count, type, indices_buffer_offset, function_pointer);
}
private static native void nglDrawElementsBO(int mode, int count, int type, int indices_buffer_offset, long function_pointer);
public static void glDrawPixels(int width, int height, int format, int type, ByteBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, 1));
long function_pointer = GLContext.getCapabilities().GL11_glDrawPixels_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1));
nglDrawPixels(width, height, format, type, pixels, pixels.position(), function_pointer);
}
public static void glDrawPixels(int width, int height, int format, int type, IntBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, 1));
long function_pointer = GLContext.getCapabilities().GL11_glDrawPixels_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1));
nglDrawPixels(width, height, format, type, pixels, pixels.position() << 2, function_pointer);
}
public static void glDrawPixels(int width, int height, int format, int type, ShortBuffer pixels) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(pixels, format, type, width, height, 1));
long function_pointer = GLContext.getCapabilities().GL11_glDrawPixels_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1));
nglDrawPixels(width, height, format, type, pixels, pixels.position() << 1, function_pointer);
}
private static native void nglDrawPixels(int width, int height, int format, int type, Buffer pixels, int pixels_position, long function_pointer);
public static void glDrawPixels(int width, int height, int format, int type, int pixels_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glDrawPixels_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglDrawPixelsBO(width, height, format, type, pixels_buffer_offset, function_pointer);
}
private static native void nglDrawPixelsBO(int width, int height, int format, int type, int pixels_buffer_offset, long function_pointer);
@@ -2044,17 +2051,18 @@ public final class GL11 {
private static native void nglEdgeFlag(boolean flag, long function_pointer);
public static void glEdgeFlagPointer(int stride, ByteBuffer pointer) {
- GLBufferChecks.ensureArrayVBOdisabled();
- BufferChecks.checkDirect(pointer);
long function_pointer = GLContext.getCapabilities().GL11_glEdgeFlagPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOdisabled();
+ BufferChecks.checkDirect(pointer);
+ GLChecks.getReferences().GL11_glEdgeFlagPointer_pointer = pointer;
nglEdgeFlagPointer(stride, pointer, pointer.position(), function_pointer);
}
private static native void nglEdgeFlagPointer(int stride, Buffer pointer, int pointer_position, long function_pointer);
public static void glEdgeFlagPointer(int stride, int pointer_buffer_offset) {
- GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glEdgeFlagPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOenabled();
nglEdgeFlagPointerBO(stride, pointer_buffer_offset, function_pointer);
}
private static native void nglEdgeFlagPointerBO(int stride, int pointer_buffer_offset, long function_pointer);
@@ -2144,9 +2152,9 @@ public final class GL11 {
private static native void nglClearStencil(int s, long function_pointer);
public static void glClipPlane(int plane, DoubleBuffer equation) {
- BufferChecks.checkBuffer(equation, 4);
long function_pointer = GLContext.getCapabilities().GL11_glClipPlane_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(equation, 4);
nglClipPlane(plane, equation, equation.position(), function_pointer);
}
private static native void nglClipPlane(int plane, DoubleBuffer equation, int equation_position, long function_pointer);
@@ -2208,24 +2216,26 @@ public final class GL11 {
private static native void nglColorMaterial(int face, int mode, long function_pointer);
public static void glColorPointer(int size, int stride, FloatBuffer pointer) {
- GLBufferChecks.ensureArrayVBOdisabled();
- BufferChecks.checkDirect(pointer);
long function_pointer = GLContext.getCapabilities().GL11_glColorPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOdisabled();
+ BufferChecks.checkDirect(pointer);
+ GLChecks.getReferences().GL11_glColorPointer_pointer = pointer;
nglColorPointer(size, GL11.GL_FLOAT, stride, pointer, pointer.position() << 2, function_pointer);
}
public static void glColorPointer(int size, boolean unsigned, int stride, ByteBuffer pointer) {
- GLBufferChecks.ensureArrayVBOdisabled();
- BufferChecks.checkDirect(pointer);
long function_pointer = GLContext.getCapabilities().GL11_glColorPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOdisabled();
+ BufferChecks.checkDirect(pointer);
+ GLChecks.getReferences().GL11_glColorPointer_pointer = pointer;
nglColorPointer(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pointer, pointer.position(), function_pointer);
}
private static native void nglColorPointer(int size, int type, int stride, Buffer pointer, int pointer_position, long function_pointer);
public static void glColorPointer(int size, int type, int stride, int pointer_buffer_offset) {
- GLBufferChecks.ensureArrayVBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glColorPointer_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureArrayVBOenabled();
nglColorPointerBO(size, type, stride, pointer_buffer_offset, function_pointer);
}
private static native void nglColorPointerBO(int size, int type, int stride, int pointer_buffer_offset, long function_pointer);
@@ -2273,9 +2283,9 @@ public final class GL11 {
private static native void nglCullFace(int mode, long function_pointer);
public static void glDeleteTextures(IntBuffer textures) {
- BufferChecks.checkDirect(textures);
long function_pointer = GLContext.getCapabilities().GL11_glDeleteTextures_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkDirect(textures);
nglDeleteTextures((textures.remaining()), textures, textures.position(), function_pointer);
}
private static native void nglDeleteTextures(int n, IntBuffer textures, int textures_position, long function_pointer);
@@ -2323,17 +2333,17 @@ public final class GL11 {
private static native void nglBindTexture(int target, int texture, long function_pointer);
public static void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, ByteBuffer bitmap) {
- GLBufferChecks.ensureUnpackPBOdisabled();
- BufferChecks.checkBuffer(bitmap, (((width + 7)/8)*height));
long function_pointer = GLContext.getCapabilities().GL11_glBitmap_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOdisabled();
+ BufferChecks.checkBuffer(bitmap, (((width + 7)/8)*height));
nglBitmap(width, height, xorig, yorig, xmove, ymove, bitmap, bitmap.position(), function_pointer);
}
private static native void nglBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, ByteBuffer bitmap, int bitmap_position, long function_pointer);
public static void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, int bitmap_buffer_offset) {
- GLBufferChecks.ensureUnpackPBOenabled();
long function_pointer = GLContext.getCapabilities().GL11_glBitmap_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ GLChecks.ensureUnpackPBOenabled();
nglBitmapBO(width, height, xorig, yorig, xmove, ymove, bitmap_buffer_offset, function_pointer);
}
private static native void nglBitmapBO(int width, int height, float xorig, float yorig, float xmove, float ymove, int bitmap_buffer_offset, long function_pointer);
@@ -2353,21 +2363,21 @@ public final class GL11 {
private static native void nglCallList(int list, long function_pointer);
public static void glCallLists(ByteBuffer lists) {
- BufferChecks.checkDirect(lists);
long function_pointer = GLContext.getCapabilities().GL11_glCallLists_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkDirect(lists);
nglCallLists((lists.remaining()), GL11.GL_UNSIGNED_BYTE, lists, lists.position(), function_pointer);
}
public static void glCallLists(IntBuffer lists) {
- BufferChecks.checkDirect(lists);
long function_pointer = GLContext.getCapabilities().GL11_glCallLists_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkDirect(lists);
nglCallLists((lists.remaining()), GL11.GL_UNSIGNED_INT, lists, lists.position() << 2, function_pointer);
}
public static void glCallLists(ShortBuffer lists) {
- BufferChecks.checkDirect(lists);
long function_pointer = GLContext.getCapabilities().GL11_glCallLists_pointer;
BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkDirect(lists);
nglCallLists((lists.remaining()), GL11.GL_UNSIGNED_SHORT, lists, lists.position() << 1, function_pointer);
}
private static native void nglCallLists(int n, int type, Buffer lists, int lists_position, long function_pointer);
diff --git a/src/java/org/lwjgl/opengl/GL12.java b/src/java/org/lwjgl/opengl/GL12.java
index 03f63414..b81cab0d 100644
--- a/src/java/org/lwjgl/opengl/GL12.java
+++ b/src/java/org/lwjgl/opengl/GL12.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/GL13.java b/src/java/org/lwjgl/opengl/GL13.java
index bbbe84df..6f104c7e 100644
--- a/src/java/org/lwjgl/opengl/GL13.java
+++ b/src/java/org/lwjgl/opengl/GL13.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/GL14.java b/src/java/org/lwjgl/opengl/GL14.java
index ea37d90f..b1122e56 100644
--- a/src/java/org/lwjgl/opengl/GL14.java
+++ b/src/java/org/lwjgl/opengl/GL14.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/GL15.java b/src/java/org/lwjgl/opengl/GL15.java
index 9e080119..b27585ec 100644
--- a/src/java/org/lwjgl/opengl/GL15.java
+++ b/src/java/org/lwjgl/opengl/GL15.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/GL20.java b/src/java/org/lwjgl/opengl/GL20.java
index 0e799f06..7e5d96cd 100644
--- a/src/java/org/lwjgl/opengl/GL20.java
+++ b/src/java/org/lwjgl/opengl/GL20.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/GLBufferChecks.java b/src/java/org/lwjgl/opengl/GLChecks.java
similarity index 93%
rename from src/java/org/lwjgl/opengl/GLBufferChecks.java
rename to src/java/org/lwjgl/opengl/GLChecks.java
index 20e0316b..7b737c70 100644
--- a/src/java/org/lwjgl/opengl/GLBufferChecks.java
+++ b/src/java/org/lwjgl/opengl/GLChecks.java
@@ -46,57 +46,61 @@ import java.nio.*;
* @author cix_foo
* @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");
}
diff --git a/src/java/org/lwjgl/opengl/NVEvaluators.java b/src/java/org/lwjgl/opengl/NVEvaluators.java
index 6b889dc8..945bedf8 100644
--- a/src/java/org/lwjgl/opengl/NVEvaluators.java
+++ b/src/java/org/lwjgl/opengl/NVEvaluators.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/NVFence.java b/src/java/org/lwjgl/opengl/NVFence.java
index 660320d2..3871f84a 100644
--- a/src/java/org/lwjgl/opengl/NVFence.java
+++ b/src/java/org/lwjgl/opengl/NVFence.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/NVFragmentProgram.java b/src/java/org/lwjgl/opengl/NVFragmentProgram.java
index a7ebe3a3..20ada989 100644
--- a/src/java/org/lwjgl/opengl/NVFragmentProgram.java
+++ b/src/java/org/lwjgl/opengl/NVFragmentProgram.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/NVHalfFloat.java b/src/java/org/lwjgl/opengl/NVHalfFloat.java
index 0c7741ad..73ba3e49 100644
--- a/src/java/org/lwjgl/opengl/NVHalfFloat.java
+++ b/src/java/org/lwjgl/opengl/NVHalfFloat.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/NVOcclusionQuery.java b/src/java/org/lwjgl/opengl/NVOcclusionQuery.java
index 3c12862e..5e022dcc 100644
--- a/src/java/org/lwjgl/opengl/NVOcclusionQuery.java
+++ b/src/java/org/lwjgl/opengl/NVOcclusionQuery.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/NVPixelDataRange.java b/src/java/org/lwjgl/opengl/NVPixelDataRange.java
index b99b44e1..77b4992a 100644
--- a/src/java/org/lwjgl/opengl/NVPixelDataRange.java
+++ b/src/java/org/lwjgl/opengl/NVPixelDataRange.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/NVPointSprite.java b/src/java/org/lwjgl/opengl/NVPointSprite.java
index cf96d25b..9350ce8d 100644
--- a/src/java/org/lwjgl/opengl/NVPointSprite.java
+++ b/src/java/org/lwjgl/opengl/NVPointSprite.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/NVProgram.java b/src/java/org/lwjgl/opengl/NVProgram.java
index 53caacee..cae9c9d7 100644
--- a/src/java/org/lwjgl/opengl/NVProgram.java
+++ b/src/java/org/lwjgl/opengl/NVProgram.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/NVRegisterCombiners.java b/src/java/org/lwjgl/opengl/NVRegisterCombiners.java
index 6d573dfe..daed73c6 100644
--- a/src/java/org/lwjgl/opengl/NVRegisterCombiners.java
+++ b/src/java/org/lwjgl/opengl/NVRegisterCombiners.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/NVRegisterCombiners2.java b/src/java/org/lwjgl/opengl/NVRegisterCombiners2.java
index b775948b..67f29776 100644
--- a/src/java/org/lwjgl/opengl/NVRegisterCombiners2.java
+++ b/src/java/org/lwjgl/opengl/NVRegisterCombiners2.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/NVVertexArrayRange.java b/src/java/org/lwjgl/opengl/NVVertexArrayRange.java
index 270d925a..9e3c0f05 100644
--- a/src/java/org/lwjgl/opengl/NVVertexArrayRange.java
+++ b/src/java/org/lwjgl/opengl/NVVertexArrayRange.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/NVVertexProgram.java b/src/java/org/lwjgl/opengl/NVVertexProgram.java
index e6ce513f..59df2bc2 100644
--- a/src/java/org/lwjgl/opengl/NVVertexProgram.java
+++ b/src/java/org/lwjgl/opengl/NVVertexProgram.java
@@ -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);
diff --git a/src/java/org/lwjgl/opengl/References.java b/src/java/org/lwjgl/opengl/References.java
new file mode 100644
index 00000000..4b846a82
--- /dev/null
+++ b/src/java/org/lwjgl/opengl/References.java
@@ -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;
+ }
+}
diff --git a/src/java/org/lwjgl/opengl/ReferencesStack.java b/src/java/org/lwjgl/opengl/ReferencesStack.java
new file mode 100644
index 00000000..f09cd819
--- /dev/null
+++ b/src/java/org/lwjgl/opengl/ReferencesStack.java
@@ -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();
+ }
+}
diff --git a/src/java/org/lwjgl/opengl/BufferObjectTracker.java b/src/java/org/lwjgl/opengl/StateTracker.java
similarity index 91%
rename from src/java/org/lwjgl/opengl/BufferObjectTracker.java
rename to src/java/org/lwjgl/opengl/StateTracker.java
index 6ef34138..c70df074 100644
--- a/src/java/org/lwjgl/opengl/BufferObjectTracker.java
+++ b/src/java/org/lwjgl/opengl/StateTracker.java
@@ -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;
}
}
diff --git a/src/java/org/lwjgl/test/input/MouseTest.java b/src/java/org/lwjgl/test/input/MouseTest.java
index 9b8eeaba..02a4659f 100644
--- a/src/java/org/lwjgl/test/input/MouseTest.java
+++ b/src/java/org/lwjgl/test/input/MouseTest.java
@@ -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 */
diff --git a/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java b/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java
index 8f767da2..a2e31a25 100644
--- a/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java
+++ b/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java
@@ -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) {
diff --git a/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java b/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java
index 39ae683f..a5f306d1 100644
--- a/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java
+++ b/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java
@@ -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
* @version $Revision$
diff --git a/src/java/org/lwjgl/util/generator/GeneratorVisitor.java b/src/java/org/lwjgl/util/generator/GeneratorVisitor.java
index 9ca02562..7d741246 100644
--- a/src/java/org/lwjgl/util/generator/GeneratorVisitor.java
+++ b/src/java/org/lwjgl/util/generator/GeneratorVisitor.java
@@ -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");
}
}
}
diff --git a/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java b/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java
index 3d0a4e22..6c06f484 100644
--- a/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java
+++ b/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java
@@ -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());
diff --git a/src/java/org/lwjgl/util/generator/ReferencesGeneratorProcessorFactory.java b/src/java/org/lwjgl/util/generator/ReferencesGeneratorProcessorFactory.java
new file mode 100644
index 00000000..4034fb49
--- /dev/null
+++ b/src/java/org/lwjgl/util/generator/ReferencesGeneratorProcessorFactory.java
@@ -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
+ * @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 supportedAnnotations =
+ unmodifiableCollection(Arrays.asList("*"));
+
+ public Collection supportedAnnotationTypes() {
+ return supportedAnnotations;
+ }
+
+ public Collection supportedOptions() {
+ return emptyList();
+ }
+
+ public void roundComplete(RoundCompleteEvent event) {
+ first_round = false;
+ }
+
+ public AnnotationProcessor getProcessorFor(Set 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 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();
+ }
+ }
+}
diff --git a/src/java/org/lwjgl/util/generator/Utils.java b/src/java/org/lwjgl/util/generator/Utils.java
index a400197e..9076e544 100644
--- a/src/java/org/lwjgl/util/generator/Utils.java
+++ b/src/java/org/lwjgl/util/generator/Utils.java
@@ -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));
}
diff --git a/src/native/build.sh b/src/native/build.sh
index 464fd1e8..e386f52d 100755
--- a/src/native/build.sh
+++ b/src/native/build.sh
@@ -1,6 +1,4 @@
#!/bin/bash
-./autogen.sh
-./configure
+cd linux
make
-strip .libs/liblwjgl.0.0.0
diff --git a/src/templates/org/lwjgl/opengl/ARB_buffer_object.java b/src/templates/org/lwjgl/opengl/ARB_buffer_object.java
index 66a5d087..c2069beb 100644
--- a/src/templates/org/lwjgl/opengl/ARB_buffer_object.java
+++ b/src/templates/org/lwjgl/opengl/ARB_buffer_object.java
@@ -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);
diff --git a/src/templates/org/lwjgl/opengl/ARB_imaging.java b/src/templates/org/lwjgl/opengl/ARB_imaging.java
index d0a77e19..fb1b052c 100644
--- a/src/templates/org/lwjgl/opengl/ARB_imaging.java
+++ b/src/templates/org/lwjgl/opengl/ARB_imaging.java
@@ -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
diff --git a/src/templates/org/lwjgl/opengl/ARB_matrix_palette.java b/src/templates/org/lwjgl/opengl/ARB_matrix_palette.java
index 93eb822f..649100af 100644
--- a/src/templates/org/lwjgl/opengl/ARB_matrix_palette.java
+++ b/src/templates/org/lwjgl/opengl/ARB_matrix_palette.java
@@ -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
diff --git a/src/templates/org/lwjgl/opengl/ARB_vertex_blend.java b/src/templates/org/lwjgl/opengl/ARB_vertex_blend.java
index b95cddd3..40714780 100644
--- a/src/templates/org/lwjgl/opengl/ARB_vertex_blend.java
+++ b/src/templates/org/lwjgl/opengl/ARB_vertex_blend.java
@@ -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
diff --git a/src/templates/org/lwjgl/opengl/ARB_vertex_program.java b/src/templates/org/lwjgl/opengl/ARB_vertex_program.java
index 639acc77..21ab0ff6 100644
--- a/src/templates/org/lwjgl/opengl/ARB_vertex_program.java
+++ b/src/templates/org/lwjgl/opengl/ARB_vertex_program.java
@@ -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
diff --git a/src/templates/org/lwjgl/opengl/ATI_element_array.java b/src/templates/org/lwjgl/opengl/ATI_element_array.java
index a1f04ec5..e84d45f1 100644
--- a/src/templates/org/lwjgl/opengl/ATI_element_array.java
+++ b/src/templates/org/lwjgl/opengl/ATI_element_array.java
@@ -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
diff --git a/src/templates/org/lwjgl/opengl/EXT_fog_coord.java b/src/templates/org/lwjgl/opengl/EXT_fog_coord.java
index 883c8c6a..9aeb780e 100644
--- a/src/templates/org/lwjgl/opengl/EXT_fog_coord.java
+++ b/src/templates/org/lwjgl/opengl/EXT_fog_coord.java
@@ -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
diff --git a/src/templates/org/lwjgl/opengl/EXT_paletted_texture.java b/src/templates/org/lwjgl/opengl/EXT_paletted_texture.java
index 078c97e5..c0ebf7f1 100644
--- a/src/templates/org/lwjgl/opengl/EXT_paletted_texture.java
+++ b/src/templates/org/lwjgl/opengl/EXT_paletted_texture.java
@@ -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
diff --git a/src/templates/org/lwjgl/opengl/EXT_secondary_color.java b/src/templates/org/lwjgl/opengl/EXT_secondary_color.java
index be3936f0..7f6260c7 100644
--- a/src/templates/org/lwjgl/opengl/EXT_secondary_color.java
+++ b/src/templates/org/lwjgl/opengl/EXT_secondary_color.java
@@ -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
diff --git a/src/templates/org/lwjgl/opengl/EXT_vertex_shader.java b/src/templates/org/lwjgl/opengl/EXT_vertex_shader.java
index ee04d1df..4f28e428 100644
--- a/src/templates/org/lwjgl/opengl/EXT_vertex_shader.java
+++ b/src/templates/org/lwjgl/opengl/EXT_vertex_shader.java
@@ -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
diff --git a/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java b/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java
index 6d4894aa..0095c896 100644
--- a/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java
+++ b/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java
@@ -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
diff --git a/src/templates/org/lwjgl/opengl/GL11.java b/src/templates/org/lwjgl/opengl/GL11.java
index 539f59f6..fe9a9156 100644
--- a/src/templates/org/lwjgl/opengl/GL11.java
+++ b/src/templates/org/lwjgl/opengl/GL11.java
@@ -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);
diff --git a/src/templates/org/lwjgl/opengl/GL12.java b/src/templates/org/lwjgl/opengl/GL12.java
index d381a743..8e4fb76b 100644
--- a/src/templates/org/lwjgl/opengl/GL12.java
+++ b/src/templates/org/lwjgl/opengl/GL12.java
@@ -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
diff --git a/src/templates/org/lwjgl/opengl/GL14.java b/src/templates/org/lwjgl/opengl/GL14.java
index d468a3ac..4548a9bc 100644
--- a/src/templates/org/lwjgl/opengl/GL14.java
+++ b/src/templates/org/lwjgl/opengl/GL14.java
@@ -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
diff --git a/src/templates/org/lwjgl/opengl/GL15.java b/src/templates/org/lwjgl/opengl/GL15.java
index 1f219741..fa48272f 100644
--- a/src/templates/org/lwjgl/opengl/GL15.java
+++ b/src/templates/org/lwjgl/opengl/GL15.java
@@ -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);
diff --git a/src/templates/org/lwjgl/opengl/GL20.java b/src/templates/org/lwjgl/opengl/GL20.java
index 60c777f6..61d376f1 100644
--- a/src/templates/org/lwjgl/opengl/GL20.java
+++ b/src/templates/org/lwjgl/opengl/GL20.java
@@ -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
diff --git a/src/templates/org/lwjgl/opengl/NV_vertex_program.java b/src/templates/org/lwjgl/opengl/NV_vertex_program.java
index 81a6f436..6a2f8eff 100644
--- a/src/templates/org/lwjgl/opengl/NV_vertex_program.java
+++ b/src/templates/org/lwjgl/opengl/NV_vertex_program.java
@@ -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