From fdfa82a06181051209e2efcca5ebde721416dba9 Mon Sep 17 00:00:00 2001
From: Elias Naur
*
*
* VD: AL_DOPPLER_VELOCITY
@@ -341,9 +340,7 @@ public final class AL10 {
* vs: Source verlocity (scalar, projected on source-listener vector)
* f: Frequency in sample
* f': effective Doppler shifted frequency
- *
* f' = DF * f * (VD-vl)/(VD+vs)
- *
* vl<0, vs>0 : source and listener approaching each other
* vl>0, vs<0 : source and listener moving away from each other
*
@@ -389,7 +386,6 @@ public final class AL10 {
* of the medium (air, water) moving with respect to listener and source are ignored.
* AL_DOPPLER_VELOCITY is the propagation speed relative to which the Source
* velocities are interpreted.
- *
*
* VD: AL_DOPPLER_VELOCITY
@@ -398,9 +394,7 @@ public final class AL10 {
* vs: Source verlocity (scalar, projected on source-listener vector)
* f: Frequency in sample
* f': effective Doppler shifted frequency
- *
* f' = DF * f * (VD-vl)/(VD+vs)
- *
* vl<0, vs>0 : source and listener approaching each other
* vl>0, vs<0 : source and listener moving away from each other
*
@@ -447,7 +441,7 @@ public final class AL10 {
* distance and other attenuation might ultimately limit the overall AL_GAIN to a value
* below 1.0.
*
+ *
* AL currently supports three modes of operation with respect to distance * attenuation. It supports two distance-dependent attenuation models, one which is * similar to the IASIG I3DL2 (and DS3D) model. The application choses one of these @@ -456,22 +450,22 @@ public final class AL10 { *
*
* Legal arguments are AL_NONE, AL_INVERSE_DISTANCE, and
- * AL_INVERSE_DISTANCE_CLAMPED.
+ * AL_INVERSE_DISTANCE_CLAMPED.
*
*
* AL_NONE bypasses all distance attenuation
* calculation for all Sources. The implementation is expected to optimize this
- * situation.
+ * situation.
*
*
* AL_INVERSE_DISTANCE_CLAMPED is the DS3D model, with
* AL_REFERENCE_DISTANCE indicating both the reference distance and the distance
- * below which gain will be clamped.
+ * below which gain will be clamped.
*
*
* AL_INVERSE_DISTANCE is equivalent to the DS3D
* model with the exception that AL_REFERENCE_DISTANCE does not imply any
- * clamping.
+ * clamping.
*
*
* The AL implementation is still free to apply any range clamping as
@@ -584,38 +578,7 @@ public final class AL10 {
*
- * A special case of Buffer state is the actual sound sample data stored in asociation - * with the Buffer. Applications can specify sample data using BufferData. - *
- *- * The data specified is copied to an internal software, or if possible, hardware buffer. - * The implementation is free to apply decompression, conversion, resampling, and - * filtering as needed. The internal format of the Buffer is not exposed to the - * application, and not accessible. Valid formats are AL_FORMAT_MONO8, - * AL_FORMAT_MONO16, AL_FORMAT_STEREO8, and AL_FORMAT_STEREO16. An - * implementation may expose other formats, see the chapter on Extensions for - * information on determining if additional formats are supported. - *
- *- * Applications should always check for an error condition after attempting to specify - * buffer data in case an implementation has to generate an AL_OUT_OF_MEMORY or - * conversion related AL_INVALID_VALUE error. The application is free to reuse the - * memory specified by the data pointer once the call to BufferData returns. The - * implementation has to dereference, e.g. copy, the data during BufferData execution. - *
- * @param buffer Buffer to fill - * @param format format sound data is in - * @param data location of data + * @param data location of data * @param freq frequency of data */ public static void alBufferData(int buffer, int format, IntBuffer data, int freq) { @@ -646,7 +609,38 @@ public final class AL10 { * * @param buffer Buffer to fill * @param format format sound data is in - * @param data location of data + * @param data location of data + * @param freq frequency of data + */ + public static void alBufferData(int buffer, int format, ShortBuffer data, int freq) { + BufferChecks.checkDirect(data); + nalBufferData(buffer, format, data, data.position() << 1, (data.remaining() << 1), freq); + Util.checkALError(); + } + /** + *+ * A special case of Buffer state is the actual sound sample data stored in asociation + * with the Buffer. Applications can specify sample data using BufferData. + *
+ *+ * The data specified is copied to an internal software, or if possible, hardware buffer. + * The implementation is free to apply decompression, conversion, resampling, and + * filtering as needed. The internal format of the Buffer is not exposed to the + * application, and not accessible. Valid formats are AL_FORMAT_MONO8, + * AL_FORMAT_MONO16, AL_FORMAT_STEREO8, and AL_FORMAT_STEREO16. An + * implementation may expose other formats, see the chapter on Extensions for + * information on determining if additional formats are supported. + *
+ *+ * Applications should always check for an error condition after attempting to specify + * buffer data in case an implementation has to generate an AL_OUT_OF_MEMORY or + * conversion related AL_INVALID_VALUE error. The application is free to reuse the + * memory specified by the data pointer once the call to BufferData returns. The + * implementation has to dereference, e.g. copy, the data during BufferData execution. + *
+ * @param buffer Buffer to fill + * @param format format sound data is in + * @param data location of data * @param freq frequency of data */ public static void alBufferData(int buffer, int format, ByteBuffer data, int freq) { @@ -939,7 +933,7 @@ public final class AL10 { /** * The application requests deletion of a number of Sources by DeleteSources. - * @param source Source array to delete from + * @param sources Source array to delete from */ public static void alDeleteSources(IntBuffer sources) { BufferChecks.checkDirect(sources); @@ -1076,7 +1070,7 @@ public final class AL10 { *
* A null
name argument returns AL_FALSE, as do invalid and unsupported string
* tokens. A null
deviceHandle will result in an INVALID_DEVICE error.
- *
@@ -1198,8 +1191,7 @@ public final class AL10 { private static native void nalGetFloatv(int pname, FloatBuffer data, int data_position); /** - * Like OpenGL, AL uses a simplified interface for querying global state. - * + * Like OpenGL, AL uses a simplified interface for querying global state. * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, * AL_DISTANCE_MODEL. *
@@ -1218,8 +1210,7 @@ public final class AL10 { private static native void nalGetIntegerv(int pname, IntBuffer data, int data_position); /** - * Like OpenGL, AL uses a simplified interface for querying global state. - * + * Like OpenGL, AL uses a simplified interface for querying global state. * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, * AL_DISTANCE_MODEL. *
@@ -1237,8 +1228,7 @@ public final class AL10 { private static native float nalGetFloat(int pname); /** - * Like OpenGL, AL uses a simplified interface for querying global state. - * + * Like OpenGL, AL uses a simplified interface for querying global state. * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, * AL_DISTANCE_MODEL. *
@@ -1256,8 +1246,7 @@ public final class AL10 { private static native int nalGetInteger(int pname); /** - * Like OpenGL, AL uses a simplified interface for querying global state. - * + * Like OpenGL, AL uses a simplified interface for querying global state. * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, * AL_DISTANCE_MODEL. *
diff --git a/src/java/org/lwjgl/opengl/ARBBufferObject.java b/src/java/org/lwjgl/opengl/ARBBufferObject.java index 6cc91749..c5cc9473 100644 --- a/src/java/org/lwjgl/opengl/ARBBufferObject.java +++ b/src/java/org/lwjgl/opengl/ARBBufferObject.java @@ -48,8 +48,8 @@ public class ARBBufferObject { * way, an application will normally use glMapBufferARB like this: *
* ByteBuffer mapped_buffer; mapped_buffer = glMapBufferARB(..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferARB(..., ..., ..., mapped_buffer); - * @param size The size of the buffer area. - * @param oldBuffer A ByteBuffer. If this argument points to the same address as the new mapping, it will be returned and no new buffer will be created. In that case, size is ignored. + * @param result_size The size of the buffer area. + * @param old_buffer A ByteBuffer. If this argument points to the same address as the new mapping, it will be returned and no new buffer will be created. In that case, size is ignored. * @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) { @@ -60,61 +60,61 @@ public class ARBBufferObject { } private static native java.nio.ByteBuffer nglMapBufferARB(int target, int access, int result_size, java.nio.ByteBuffer old_buffer); - public static void glGetBufferSubDataARB(int target, int offset, ShortBuffer data) { + public static void glGetBufferSubDataARB(int target, int offset, ByteBuffer data) { BufferChecks.checkDirect(data); - nglGetBufferSubDataARB(target, offset, (data.remaining() << 1), data, data.position() << 1); + nglGetBufferSubDataARB(target, offset, (data.remaining()), data, data.position()); } public static void glGetBufferSubDataARB(int target, int offset, IntBuffer data) { BufferChecks.checkDirect(data); nglGetBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2); } + public static void glGetBufferSubDataARB(int target, int offset, ShortBuffer data) { + BufferChecks.checkDirect(data); + nglGetBufferSubDataARB(target, offset, (data.remaining() << 1), data, data.position() << 1); + } public static void glGetBufferSubDataARB(int target, int offset, FloatBuffer data) { BufferChecks.checkDirect(data); nglGetBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2); } - public static void glGetBufferSubDataARB(int target, int offset, ByteBuffer data) { - BufferChecks.checkDirect(data); - nglGetBufferSubDataARB(target, offset, (data.remaining()), data, data.position()); - } private static native void nglGetBufferSubDataARB(int target, int offset, int size, Buffer data, int data_position); - public static void glBufferSubDataARB(int target, int offset, ShortBuffer data) { + public static void glBufferSubDataARB(int target, int offset, ByteBuffer data) { BufferChecks.checkDirect(data); - nglBufferSubDataARB(target, offset, (data.remaining() << 1), data, data.position() << 1); + nglBufferSubDataARB(target, offset, (data.remaining()), data, data.position()); } public static void glBufferSubDataARB(int target, int offset, IntBuffer data) { BufferChecks.checkDirect(data); nglBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2); } + public static void glBufferSubDataARB(int target, int offset, ShortBuffer data) { + BufferChecks.checkDirect(data); + nglBufferSubDataARB(target, offset, (data.remaining() << 1), data, data.position() << 1); + } public static void glBufferSubDataARB(int target, int offset, FloatBuffer data) { BufferChecks.checkDirect(data); nglBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2); } - public static void glBufferSubDataARB(int target, int offset, ByteBuffer data) { - BufferChecks.checkDirect(data); - nglBufferSubDataARB(target, offset, (data.remaining()), data, data.position()); - } private static native void nglBufferSubDataARB(int target, int offset, int size, Buffer data, int data_position); public static void glBufferDataARB(int target, int size, int usage) { nglBufferDataARB(target, size, null, 0, usage); } - public static void glBufferDataARB(int target, ShortBuffer data, int usage) { + public static void glBufferDataARB(int target, ByteBuffer data, int usage) { BufferChecks.checkDirect(data); - nglBufferDataARB(target, (data.remaining() << 1), data, data.position() << 1, usage); + nglBufferDataARB(target, (data.remaining()), data, data.position(), usage); } public static void glBufferDataARB(int target, IntBuffer data, int usage) { BufferChecks.checkDirect(data); nglBufferDataARB(target, (data.remaining() << 2), data, data.position() << 2, usage); } + public static void glBufferDataARB(int target, ShortBuffer data, int usage) { + BufferChecks.checkDirect(data); + nglBufferDataARB(target, (data.remaining() << 1), data, data.position() << 1, usage); + } public static void glBufferDataARB(int target, FloatBuffer data, int usage) { BufferChecks.checkDirect(data); nglBufferDataARB(target, (data.remaining() << 2), data, data.position() << 2, usage); } - public static void glBufferDataARB(int target, ByteBuffer data, int usage) { - BufferChecks.checkDirect(data); - nglBufferDataARB(target, (data.remaining()), data, data.position(), usage); - } private static native void nglBufferDataARB(int target, int size, Buffer data, int data_position, int usage); public static native boolean glIsBufferARB(int buffer); diff --git a/src/java/org/lwjgl/opengl/ARBColorBufferFloat.java b/src/java/org/lwjgl/opengl/ARBColorBufferFloat.java index 843ed818..9a930fde 100644 --- a/src/java/org/lwjgl/opengl/ARBColorBufferFloat.java +++ b/src/java/org/lwjgl/opengl/ARBColorBufferFloat.java @@ -7,14 +7,11 @@ import org.lwjgl.BufferChecks; import java.nio.*; public final class ARBColorBufferFloat { - public static final int GLX_RGBA_FLOAT_BIT = 0x4; - public static final int GLX_RGBA_FLOAT_TYPE = 0x20b9; - public static final int WGL_TYPE_RGBA_FLOAT_ARB = 0x21a0; - public static final int FIXED_ONLY_ARB = 0x891d; - public static final int CLAMP_READ_COLOR_ARB = 0x891c; - public static final int CLAMP_FRAGMENT_COLOR_ARB = 0x891b; - public static final int CLAMP_VERTEX_COLOR_ARB = 0x891a; - public static final int RGBA_FLOAT_MODE_ARB = 0x8820; + public static final int GL_FIXED_ONLY_ARB = 0x891d; + public static final int GL_CLAMP_READ_COLOR_ARB = 0x891c; + public static final int GL_CLAMP_FRAGMENT_COLOR_ARB = 0x891b; + public static final int GL_CLAMP_VERTEX_COLOR_ARB = 0x891a; + public static final int GL_RGBA_FLOAT_MODE_ARB = 0x8820; private ARBColorBufferFloat() { } diff --git a/src/java/org/lwjgl/opengl/ARBImaging.java b/src/java/org/lwjgl/opengl/ARBImaging.java index 9cc1006d..06731721 100644 --- a/src/java/org/lwjgl/opengl/ARBImaging.java +++ b/src/java/org/lwjgl/opengl/ARBImaging.java @@ -88,432 +88,12 @@ public final class ARBImaging { static native void initNativeStubs() throws LWJGLException; - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, ByteBuffer span) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkDirect(row); BufferChecks.checkDirect(column); BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 1, span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 1, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 1, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 1, span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, FloatBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, FloatBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, FloatBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, FloatBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position(), span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position(), span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position(), span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position(), span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, FloatBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, FloatBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, FloatBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, FloatBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, FloatBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, FloatBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, FloatBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, FloatBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 1, span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 1, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 1, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 1, span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, FloatBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 1); - } - public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, FloatBuffer column, IntBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, FloatBuffer column, FloatBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 2); - } - public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, FloatBuffer column, ByteBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position()); - } - public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, ShortBuffer span) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(row); - BufferChecks.checkDirect(column); - BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position(), span, span.position() << 1); + nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position(), span, span.position()); } public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, IntBuffer span) { GLBufferChecks.ensurePackPBOdisabled(); @@ -522,6 +102,13 @@ public final class ARBImaging { BufferChecks.checkDirect(span); nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position(), span, span.position() << 2); } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position(), span, span.position() << 1); + } public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, FloatBuffer span) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkDirect(row); @@ -529,12 +116,425 @@ public final class ARBImaging { BufferChecks.checkDirect(span); nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position(), span, span.position() << 2); } - public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, ByteBuffer span) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkDirect(row); BufferChecks.checkDirect(column); BufferChecks.checkDirect(span); - nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position(), span, span.position()); + nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, ByteBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 1, span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 1, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 1, span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 1, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, FloatBuffer column, ByteBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, FloatBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, FloatBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, FloatBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position(), column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, ByteBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, ByteBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, ByteBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, FloatBuffer column, ByteBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, FloatBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, FloatBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, FloatBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, ByteBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position(), span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position(), span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position(), span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position(), span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, ByteBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, ByteBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 1, span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 1, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 1, span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 1, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, FloatBuffer column, ByteBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, FloatBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, FloatBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, FloatBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 1, column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, ByteBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position(), span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, ByteBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, ByteBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 1, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, FloatBuffer column, ByteBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position()); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, FloatBuffer column, IntBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, FloatBuffer column, ShortBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 1); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, FloatBuffer column, FloatBuffer span) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, row, row.position() << 2, column, column.position() << 2, span, span.position() << 2); } 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); public static void glGetSeparableFilter(int target, int format, int type, int row_buffer_offset, int column_buffer_offset, int span_buffer_offset) { @@ -543,83 +543,11 @@ public final class ARBImaging { } private static native void nglGetSeparableFilterBO(int target, int format, int type, int row_buffer_offset, int column_buffer_offset, int span_buffer_offset); - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer row, ShortBuffer column) { + 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); - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 1, column, column.position() << 1); - } - 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); - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 1, column, column.position() << 2); - } - 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); - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 1, column, column.position() << 2); - } - 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); - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 1, column, column.position()); - } - 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); - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 1); - } - 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); - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 2); - } - 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); - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 2); - } - 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); - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position()); - } - 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); - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 1); - } - 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); - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 2); - } - 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); - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 2); - } - 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); - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position()); - } - 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); - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position(), column, column.position() << 1); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position(), column, column.position()); } public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer row, IntBuffer column) { GLBufferChecks.ensureUnpackPBOdisabled(); @@ -627,17 +555,89 @@ public final class ARBImaging { BufferChecks.checkDirect(column); nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position(), column, column.position() << 2); } + 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); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position(), column, column.position() << 1); + } 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); nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position(), column, column.position() << 2); } - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer row, ByteBuffer column) { + 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); - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position(), column, column.position()); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position()); + } + 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); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 2); + } + 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); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 1); + } + 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); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 2); + } + 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); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 1, column, column.position()); + } + 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); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 1, column, column.position() << 2); + } + 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); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 1, column, column.position() << 1); + } + 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); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 1, column, column.position() << 2); + } + 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); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position()); + } + 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); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 2); + } + 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); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 1); + } + 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); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, row.position() << 2, column, column.position() << 2); } 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); public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, int row_buffer_offset, int column_buffer_offset) { @@ -658,26 +658,26 @@ public final class ARBImaging { } private static native void nglGetConvolutionParameterfv(int target, int pname, FloatBuffer params, int params_position); - public static void glGetConvolutionFilter(int target, int format, int type, ShortBuffer image) { + public static void glGetConvolutionFilter(int target, int format, int type, ByteBuffer image) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkDirect(image); - nglGetConvolutionFilter(target, format, type, image, image.position() << 1); + nglGetConvolutionFilter(target, format, type, image, image.position()); } public static void glGetConvolutionFilter(int target, int format, int type, IntBuffer image) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkDirect(image); nglGetConvolutionFilter(target, format, type, image, image.position() << 2); } + public static void glGetConvolutionFilter(int target, int format, int type, ShortBuffer image) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(image); + nglGetConvolutionFilter(target, format, type, image, image.position() << 1); + } public static void glGetConvolutionFilter(int target, int format, int type, FloatBuffer image) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkDirect(image); nglGetConvolutionFilter(target, format, type, image, image.position() << 2); } - public static void glGetConvolutionFilter(int target, int format, int type, ByteBuffer image) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(image); - nglGetConvolutionFilter(target, format, type, image, image.position()); - } private static native void nglGetConvolutionFilter(int target, int format, int type, Buffer image, int image_position); public static void glGetConvolutionFilter(int target, int format, int type, int image_buffer_offset) { GLBufferChecks.ensurePackPBOenabled(); @@ -705,20 +705,20 @@ public final class ARBImaging { public static native void glConvolutionParameterf(int target, int pname, float params); - public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer image) { + 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)); - nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() << 1); + nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position()); } 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)); nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() << 2); } - public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer image) { + 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)); - nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position()); + nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() << 1); } private static native void nglConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer image, int image_position); public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, int image_buffer_offset) { @@ -727,26 +727,26 @@ public final class ARBImaging { } private static native void nglConvolutionFilter2DBO(int target, int internalformat, int width, int height, int format, int type, int image_buffer_offset); - public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ShortBuffer image) { + 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)); - nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position() << 1); + nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position()); } 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)); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position() << 2); } + 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)); + nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position() << 1); + } 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)); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position() << 2); } - 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)); - nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position()); - } private static native void nglConvolutionFilter1D(int target, int internalformat, int width, int format, int type, Buffer image, int image_position); public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, int image_buffer_offset) { GLBufferChecks.ensureUnpackPBOenabled(); @@ -766,26 +766,26 @@ public final class ARBImaging { } private static native void nglGetMinmaxParameterfv(int target, int pname, FloatBuffer params, int params_position); - public static void glGetMinmax(int target, boolean reset, int format, int types, ShortBuffer values) { + public static void glGetMinmax(int target, boolean reset, int format, int types, ByteBuffer values) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values, 4); - nglGetMinmax(target, reset, format, types, values, values.position() << 1); + nglGetMinmax(target, reset, format, types, values, values.position()); } public static void glGetMinmax(int target, boolean reset, int format, int types, IntBuffer values) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values, 4); nglGetMinmax(target, reset, format, types, values, values.position() << 2); } + public static void glGetMinmax(int target, boolean reset, int format, int types, ShortBuffer values) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkBuffer(values, 4); + nglGetMinmax(target, reset, format, types, values, values.position() << 1); + } public static void glGetMinmax(int target, boolean reset, int format, int types, FloatBuffer values) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values, 4); nglGetMinmax(target, reset, format, types, values, values.position() << 2); } - public static void glGetMinmax(int target, boolean reset, int format, int types, ByteBuffer values) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkBuffer(values, 4); - nglGetMinmax(target, reset, format, types, values, values.position()); - } private static native void nglGetMinmax(int target, boolean reset, int format, int types, Buffer values, int values_position); public static void glGetMinmax(int target, boolean reset, int format, int types, int values_buffer_offset) { GLBufferChecks.ensurePackPBOenabled(); @@ -809,26 +809,26 @@ public final class ARBImaging { } private static native void nglGetHistogramParameterfv(int target, int pname, FloatBuffer params, int params_position); - public static void glGetHistogram(int target, boolean reset, int format, int type, ShortBuffer values) { + public static void glGetHistogram(int target, boolean reset, int format, int type, ByteBuffer values) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values, 256); - nglGetHistogram(target, reset, format, type, values, values.position() << 1); + nglGetHistogram(target, reset, format, type, values, values.position()); } public static void glGetHistogram(int target, boolean reset, int format, int type, IntBuffer values) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values, 256); nglGetHistogram(target, reset, format, type, values, values.position() << 2); } + public static void glGetHistogram(int target, boolean reset, int format, int type, ShortBuffer values) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkBuffer(values, 256); + nglGetHistogram(target, reset, format, type, values, values.position() << 1); + } public static void glGetHistogram(int target, boolean reset, int format, int type, FloatBuffer values) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values, 256); nglGetHistogram(target, reset, format, type, values, values.position() << 2); } - public static void glGetHistogram(int target, boolean reset, int format, int type, ByteBuffer values) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkBuffer(values, 256); - nglGetHistogram(target, reset, format, type, values, values.position()); - } private static native void nglGetHistogram(int target, boolean reset, int format, int type, Buffer values, int values_position); public static void glGetHistogram(int target, boolean reset, int format, int type, int values_buffer_offset) { GLBufferChecks.ensurePackPBOenabled(); @@ -856,14 +856,14 @@ public final class ARBImaging { } private static native void nglGetColorTableParameteriv(int target, int pname, IntBuffer params, int params_position); - public static void glGetColorTable(int target, int format, int type, FloatBuffer data) { - BufferChecks.checkBuffer(data, 256); - nglGetColorTable(target, format, type, data, data.position() << 2); - } public static void glGetColorTable(int target, int format, int type, ByteBuffer data) { BufferChecks.checkBuffer(data, 256); nglGetColorTable(target, format, type, data, data.position()); } + public static void glGetColorTable(int target, int format, int type, FloatBuffer data) { + BufferChecks.checkBuffer(data, 256); + nglGetColorTable(target, format, type, data, data.position() << 2); + } private static native void nglGetColorTable(int target, int format, int type, Buffer data, int data_position); public static native void glCopyColorTable(int target, int internalformat, int x, int y, int width); @@ -882,16 +882,16 @@ public final class ARBImaging { } private static native void nglColorTableParameteriv(int target, int pname, IntBuffer params, int params_position); - public static void glColorSubTable(int target, int start, int count, int format, int type, FloatBuffer data) { - GLBufferChecks.ensureUnpackPBOdisabled(); - BufferChecks.checkBuffer(data, 256); - nglColorSubTable(target, start, count, format, type, data, data.position() << 2); - } public static void glColorSubTable(int target, int start, int count, int format, int type, ByteBuffer data) { GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(data, 256); nglColorSubTable(target, start, count, format, type, data, data.position()); } + public static void glColorSubTable(int target, int start, int count, int format, int type, FloatBuffer data) { + GLBufferChecks.ensureUnpackPBOdisabled(); + BufferChecks.checkBuffer(data, 256); + nglColorSubTable(target, start, count, format, type, data, data.position() << 2); + } private static native void nglColorSubTable(int target, int start, int count, int format, int type, Buffer data, int data_position); public static void glColorSubTable(int target, int start, int count, int format, int type, int data_buffer_offset) { GLBufferChecks.ensureUnpackPBOenabled(); @@ -899,16 +899,16 @@ public final class ARBImaging { } private static native void nglColorSubTableBO(int target, int start, int count, int format, int type, int data_buffer_offset); - public static void glColorTable(int target, int internalFormat, int width, int format, int type, FloatBuffer data) { - GLBufferChecks.ensureUnpackPBOdisabled(); - BufferChecks.checkBuffer(data, 256); - nglColorTable(target, internalFormat, width, format, type, data, data.position() << 2); - } public static void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(data, 256); nglColorTable(target, internalFormat, width, format, type, data, data.position()); } + public static void glColorTable(int target, int internalFormat, int width, int format, int type, FloatBuffer data) { + GLBufferChecks.ensureUnpackPBOdisabled(); + BufferChecks.checkBuffer(data, 256); + nglColorTable(target, internalFormat, width, format, type, data, data.position() << 2); + } private static native void nglColorTable(int target, int internalFormat, int width, int format, int type, Buffer data, int data_position); public static void glColorTable(int target, int internalFormat, int width, int format, int type, int data_buffer_offset) { GLBufferChecks.ensureUnpackPBOenabled(); diff --git a/src/java/org/lwjgl/opengl/ARBMatrixPalette.java b/src/java/org/lwjgl/opengl/ARBMatrixPalette.java index d773c48b..7bac6e02 100644 --- a/src/java/org/lwjgl/opengl/ARBMatrixPalette.java +++ b/src/java/org/lwjgl/opengl/ARBMatrixPalette.java @@ -41,16 +41,16 @@ public final class ARBMatrixPalette { } private static native void nglMatrixIndexubvARB(int size, ByteBuffer pIndices, int pIndices_position); - public static void glMatrixIndexPointerARB(int size, int stride, IntBuffer pPointer) { - GLBufferChecks.ensureArrayVBOdisabled(); - BufferChecks.checkDirect(pPointer); - nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_INT, stride, pPointer, pPointer.position() << 2); - } public static void glMatrixIndexPointerARB(int size, int stride, ByteBuffer pPointer) { GLBufferChecks.ensureArrayVBOdisabled(); BufferChecks.checkDirect(pPointer); nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_BYTE, stride, pPointer, pPointer.position()); } + public static void glMatrixIndexPointerARB(int size, int stride, IntBuffer pPointer) { + GLBufferChecks.ensureArrayVBOdisabled(); + BufferChecks.checkDirect(pPointer); + nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_INT, stride, pPointer, pPointer.position() << 2); + } public static void glMatrixIndexPointerARB(int size, int stride, ShortBuffer pPointer) { GLBufferChecks.ensureArrayVBOdisabled(); BufferChecks.checkDirect(pPointer); diff --git a/src/java/org/lwjgl/opengl/ARBTextureCompression.java b/src/java/org/lwjgl/opengl/ARBTextureCompression.java index ddce9466..e68c4875 100644 --- a/src/java/org/lwjgl/opengl/ARBTextureCompression.java +++ b/src/java/org/lwjgl/opengl/ARBTextureCompression.java @@ -24,26 +24,26 @@ public final class ARBTextureCompression { static native void initNativeStubs() throws LWJGLException; - public static void glGetCompressedTexImageARB(int target, int lod, ShortBuffer pImg) { + public static void glGetCompressedTexImageARB(int target, int lod, ByteBuffer pImg) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkDirect(pImg); - nglGetCompressedTexImageARB(target, lod, pImg, pImg.position() << 1); + nglGetCompressedTexImageARB(target, lod, pImg, pImg.position()); } public static void glGetCompressedTexImageARB(int target, int lod, IntBuffer pImg) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkDirect(pImg); nglGetCompressedTexImageARB(target, lod, pImg, pImg.position() << 2); } + public static void glGetCompressedTexImageARB(int target, int lod, ShortBuffer pImg) { + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkDirect(pImg); + nglGetCompressedTexImageARB(target, lod, pImg, pImg.position() << 1); + } public static void glGetCompressedTexImageARB(int target, int lod, FloatBuffer pImg) { GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkDirect(pImg); nglGetCompressedTexImageARB(target, lod, pImg, pImg.position() << 2); } - public static void glGetCompressedTexImageARB(int target, int lod, ByteBuffer pImg) { - GLBufferChecks.ensurePackPBOdisabled(); - BufferChecks.checkDirect(pImg); - nglGetCompressedTexImageARB(target, lod, pImg, pImg.position()); - } private static native void nglGetCompressedTexImageARB(int target, int lod, Buffer pImg, int pImg_position); public static void glGetCompressedTexImageARB(int target, int lod, int pImg_buffer_offset) { GLBufferChecks.ensurePackPBOenabled(); @@ -51,26 +51,26 @@ public final class ARBTextureCompression { } private static native void nglGetCompressedTexImageARBBO(int target, int lod, int pImg_buffer_offset); - 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) { + 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); - nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position() << 1); + nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position()); } 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); nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position() << 2); } + 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); + nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position() << 1); + } 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); nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position() << 2); } - 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); - nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position()); - } 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); 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(); @@ -78,26 +78,26 @@ public final class ARBTextureCompression { } 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); - public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ShortBuffer pData) { + 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); - nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position() << 1); + nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position()); } 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); nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position() << 2); } + 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); + nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position() << 1); + } 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); nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position() << 2); } - 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); - nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position()); - } 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); 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(); @@ -105,26 +105,26 @@ public final class ARBTextureCompression { } 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); - public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, ShortBuffer pData) { + public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, ByteBuffer pData) { GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkDirect(pData); - nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position() << 1); + nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position()); } public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, IntBuffer pData) { GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkDirect(pData); nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position() << 2); } + public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, ShortBuffer pData) { + GLBufferChecks.ensureUnpackPBOdisabled(); + BufferChecks.checkDirect(pData); + nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position() << 1); + } public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, FloatBuffer pData) { GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkDirect(pData); nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position() << 2); } - public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, ByteBuffer pData) { - GLBufferChecks.ensureUnpackPBOdisabled(); - BufferChecks.checkDirect(pData); - nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position()); - } private static native void nglCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, Buffer pData, int pData_position); public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, int pData_buffer_offset) { GLBufferChecks.ensureUnpackPBOenabled(); @@ -132,26 +132,26 @@ public final class ARBTextureCompression { } private static native void nglCompressedTexSubImage1DARBBO(int target, int level, int xoffset, int width, int format, int imageSize, int pData_buffer_offset); - public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ShortBuffer pData) { + 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); - nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position() << 1); + nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position()); } 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); nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position() << 2); } + 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); + nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position() << 1); + } 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); nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position() << 2); } - 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); - nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position()); - } 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); 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(); @@ -159,26 +159,26 @@ public final class ARBTextureCompression { } 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); - public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, ShortBuffer pData) { + 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); - nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position() << 1); + nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position()); } 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); nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position() << 2); } + 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); + nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position() << 1); + } 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); nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position() << 2); } - 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); - nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position()); - } private static native void nglCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, Buffer pData, int pData_position); public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, int pData_buffer_offset) { GLBufferChecks.ensureUnpackPBOenabled(); @@ -186,26 +186,26 @@ public final class ARBTextureCompression { } private static native void nglCompressedTexImage2DARBBO(int target, int level, int internalformat, int width, int height, int border, int imageSize, int pData_buffer_offset); - public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, ShortBuffer pData) { + public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, ByteBuffer pData) { GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkDirect(pData); - nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position() << 1); + nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position()); } public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, IntBuffer pData) { GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkDirect(pData); nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position() << 2); } + public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, ShortBuffer pData) { + GLBufferChecks.ensureUnpackPBOdisabled(); + BufferChecks.checkDirect(pData); + nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position() << 1); + } public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, FloatBuffer pData) { GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkDirect(pData); nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position() << 2); } - public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, ByteBuffer pData) { - GLBufferChecks.ensureUnpackPBOdisabled(); - BufferChecks.checkDirect(pData); - nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position()); - } private static native void nglCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, Buffer pData, int pData_position); public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, int pData_buffer_offset) { GLBufferChecks.ensureUnpackPBOenabled(); diff --git a/src/java/org/lwjgl/opengl/ARBVertexBlend.java b/src/java/org/lwjgl/opengl/ARBVertexBlend.java index a8b1b31e..0d86b9b1 100644 --- a/src/java/org/lwjgl/opengl/ARBVertexBlend.java +++ b/src/java/org/lwjgl/opengl/ARBVertexBlend.java @@ -57,6 +57,11 @@ public final class ARBVertexBlend { public static native void glVertexBlendARB(int count); + public static void glWeightPointerARB(int size, boolean unsigned, int stride, ByteBuffer pPointer) { + GLBufferChecks.ensureArrayVBOdisabled(); + BufferChecks.checkDirect(pPointer); + nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pPointer, pPointer.position()); + } public static void glWeightPointerARB(int size, boolean unsigned, int stride, IntBuffer pPointer) { GLBufferChecks.ensureArrayVBOdisabled(); BufferChecks.checkDirect(pPointer); @@ -67,11 +72,6 @@ public final class ARBVertexBlend { BufferChecks.checkDirect(pPointer); nglWeightPointerARB(size, GL11.GL_FLOAT, stride, pPointer, pPointer.position() << 2); } - public static void glWeightPointerARB(int size, boolean unsigned, int stride, ByteBuffer pPointer) { - GLBufferChecks.ensureArrayVBOdisabled(); - BufferChecks.checkDirect(pPointer); - nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pPointer, pPointer.position()); - } public static void glWeightPointerARB(int size, boolean unsigned, int stride, ShortBuffer pPointer) { GLBufferChecks.ensureArrayVBOdisabled(); BufferChecks.checkDirect(pPointer); diff --git a/src/java/org/lwjgl/opengl/ARBVertexProgram.java b/src/java/org/lwjgl/opengl/ARBVertexProgram.java index 63f657ce..c90cab77 100644 --- a/src/java/org/lwjgl/opengl/ARBVertexProgram.java +++ b/src/java/org/lwjgl/opengl/ARBVertexProgram.java @@ -51,6 +51,11 @@ public final class ARBVertexProgram extends ARBProgram { public static native void glEnableVertexAttribArrayARB(int index); + public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) { + GLBufferChecks.ensureArrayVBOdisabled(); + BufferChecks.checkDirect(buffer); + nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, normalized, stride, buffer, buffer.position()); + } public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, IntBuffer buffer) { GLBufferChecks.ensureArrayVBOdisabled(); BufferChecks.checkDirect(buffer); @@ -61,11 +66,6 @@ public final class ARBVertexProgram extends ARBProgram { BufferChecks.checkDirect(buffer); nglVertexAttribPointerARB(index, size, GL11.GL_FLOAT, normalized, stride, buffer, buffer.position() << 2); } - public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) { - GLBufferChecks.ensureArrayVBOdisabled(); - BufferChecks.checkDirect(buffer); - nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, normalized, stride, buffer, buffer.position()); - } public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ShortBuffer buffer) { GLBufferChecks.ensureArrayVBOdisabled(); BufferChecks.checkDirect(buffer); diff --git a/src/java/org/lwjgl/opengl/ContextCapabilities.java b/src/java/org/lwjgl/opengl/ContextCapabilities.java new file mode 100644 index 00000000..d770e343 --- /dev/null +++ b/src/java/org/lwjgl/opengl/ContextCapabilities.java @@ -0,0 +1,402 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import java.util.Set; + +public class ContextCapabilities { + public final boolean GL_ARB_color_buffer_float; + public final boolean GL_ARB_depth_texture; + public final boolean GL_ARB_draw_buffers; + public final boolean GL_ARB_fragment_program; + public final boolean GL_ARB_fragment_program_shadow; + public final boolean GL_ARB_fragment_shader; + public final boolean GL_ARB_half_float_pixel; + public final boolean GL_ARB_imaging; + public final boolean GL_ARB_matrix_palette; + public final boolean GL_ARB_multisample; + public final boolean GL_ARB_multitexture; + public final boolean GL_ARB_occlusion_query; + public final boolean GL_ARB_pixel_buffer_object; + public final boolean GL_ARB_point_parameters; + public final boolean GL_ARB_point_sprite; + public final boolean GL_ARB_shader_objects; + public final boolean GL_ARB_shading_language_100; + public final boolean GL_ARB_shadow; + public final boolean GL_ARB_shadow_ambient; + public final boolean GL_ARB_texture_border_clamp; + public final boolean GL_ARB_texture_compression; + public final boolean GL_ARB_texture_cube_map; + public final boolean GL_ARB_texture_env_add; + public final boolean GL_ARB_texture_env_combine; + public final boolean GL_ARB_texture_env_crossbar; + public final boolean GL_ARB_texture_env_dot3; + public final boolean GL_ARB_texture_float; + public final boolean GL_ARB_texture_mirrored_repeat; + public final boolean GL_ARB_texture_non_power_of_two; + public final boolean GL_ARB_texture_rectangle; + public final boolean GL_ARB_transpose_matrix; + public final boolean GL_ARB_vertex_blend; + public final boolean GL_ARB_vertex_buffer_object; + public final boolean GL_ARB_vertex_program; + public final boolean GL_ARB_vertex_shader; + public final boolean GL_ARB_window_pos; + public final boolean GL_ATI_draw_buffers; + public final boolean GL_ATI_element_array; + public final boolean GL_ATI_envmap_bumpmap; + public final boolean GL_ATI_fragment_shader; + public final boolean GL_ATI_map_object_buffer; + public final boolean GL_ATI_pn_triangles; + public final boolean GL_ATI_separate_stencil; + public final boolean GL_ATI_texture_compression_3dc; + public final boolean GL_ATI_texture_float; + public final boolean GL_ATI_texture_mirror_once; + public final boolean GL_ATI_vertex_array_object; + public final boolean GL_ATI_vertex_attrib_array_object; + public final boolean GL_ATI_vertex_streams; + public final boolean GL_EXT_abgr; + public final boolean GL_EXT_bgra; + public final boolean GL_EXT_blend_equation_separate; + public final boolean GL_EXT_blend_func_separate; + public final boolean GL_EXT_blend_subtract; + public final boolean GL_EXT_cg_shader; + public final boolean GL_EXT_compiled_vertex_array; + public final boolean GL_EXT_depth_bounds_test; + public final boolean GL_EXT_draw_range_elements; + public final boolean GL_EXT_fog_coord; + public final boolean GL_EXT_framebuffer_object; + public final boolean GL_EXT_multi_draw_arrays; + public final boolean GL_EXT_packed_pixels; + public final boolean GL_EXT_paletted_texture; + public final boolean GL_EXT_pixel_buffer_object; + public final boolean GL_EXT_point_parameters; + public final boolean GL_EXT_rescale_normal; + public final boolean GL_EXT_secondary_color; + public final boolean GL_EXT_separate_specular_color; + public final boolean GL_EXT_shadow_funcs; + public final boolean GL_EXT_shared_texture_palette; + public final boolean GL_EXT_stencil_two_side; + public final boolean GL_EXT_stencil_wrap; + public final boolean GL_EXT_texture_3d; + public final boolean GL_EXT_texture_compression_s3tc; + public final boolean GL_EXT_texture_env_combine; + public final boolean GL_EXT_texture_env_dot3; + public final boolean GL_EXT_texture_filter_anisotropic; + public final boolean GL_EXT_texture_lod_bias; + public final boolean GL_EXT_texture_mirror_clamp; + public final boolean GL_EXT_texture_rectangle; + public final boolean GL_EXT_vertex_shader; + public final boolean GL_EXT_vertex_weighting; + public final boolean OpenGL11; + public final boolean OpenGL12; + public final boolean OpenGL13; + public final boolean OpenGL14; + public final boolean OpenGL15; + public final boolean OpenGL20; + public final boolean GL_HP_occlusion_test; + public final boolean GL_IBM_rasterpos_clip; + public final boolean GL_NV_blend_square; + public final boolean GL_NV_copy_depth_to_color; + public final boolean GL_NV_depth_clamp; + public final boolean GL_NV_evaluators; + public final boolean GL_NV_fence; + public final boolean GL_NV_float_buffer; + public final boolean GL_NV_fog_distance; + public final boolean GL_NV_fragment_program; + public final boolean GL_NV_fragment_program2; + public final boolean GL_NV_fragment_program_option; + public final boolean GL_NV_half_float; + public final boolean GL_NV_light_max_exponent; + public final boolean GL_NV_multisample_filter_hint; + public final boolean GL_NV_occlusion_query; + public final boolean GL_NV_packed_depth_stencil; + public final boolean GL_NV_pixel_data_range; + public final boolean GL_NV_point_sprite; + public final boolean GL_NV_primitive_restart; + public final boolean GL_NV_register_combiners; + public final boolean GL_NV_register_combiners2; + public final boolean GL_NV_texgen_reflection; + public final boolean GL_NV_texture_compression_vtc; + public final boolean GL_NV_texture_env_combine4; + public final boolean GL_NV_texture_expand_normal; + public final boolean GL_NV_texture_rectangle; + public final boolean GL_NV_texture_shader; + public final boolean GL_NV_texture_shader2; + public final boolean GL_NV_texture_shader3; + public final boolean GL_NV_vertex_array_range; + public final boolean GL_NV_vertex_array_range2; + public final boolean GL_NV_vertex_program; + public final boolean GL_NV_vertex_program1_1; + public final boolean GL_NV_vertex_program2; + public final boolean GL_NV_vertex_program2_option; + public final boolean GL_NV_vertex_program3; + public final boolean GL_SUN_slice_accum; + + static Set initAllStubs() throws LWJGLException { + org.lwjgl.opengl.GL11.initNativeStubs(); + Set supported_extensions = GLContext.getSupportedExtensions(); + supported_extensions.add("GL_ARB_buffer_object"); + supported_extensions.add("GL_ARB_program"); + supported_extensions.add("GL_NV_program"); + GLContext.initNativeStubs(ARBBufferObject.class, supported_extensions, "GL_ARB_buffer_object"); + GLContext.initNativeStubs(ARBColorBufferFloat.class, supported_extensions, "GL_ARB_color_buffer_float"); + GLContext.initNativeStubs(ARBDrawBuffers.class, supported_extensions, "GL_ARB_draw_buffers"); + GLContext.initNativeStubs(ARBImaging.class, supported_extensions, "GL_ARB_imaging"); + GLContext.initNativeStubs(ARBMatrixPalette.class, supported_extensions, "GL_ARB_matrix_palette"); + GLContext.initNativeStubs(ARBMultisample.class, supported_extensions, "GL_ARB_multisample"); + GLContext.initNativeStubs(ARBMultitexture.class, supported_extensions, "GL_ARB_multitexture"); + GLContext.initNativeStubs(ARBOcclusionQuery.class, supported_extensions, "GL_ARB_occlusion_query"); + GLContext.initNativeStubs(ARBPointParameters.class, supported_extensions, "GL_ARB_point_parameters"); + GLContext.initNativeStubs(ARBProgram.class, supported_extensions, "GL_ARB_program"); + GLContext.initNativeStubs(ARBShaderObjects.class, supported_extensions, "GL_ARB_shader_objects"); + GLContext.initNativeStubs(ARBTextureCompression.class, supported_extensions, "GL_ARB_texture_compression"); + GLContext.initNativeStubs(ARBTransposeMatrix.class, supported_extensions, "GL_ARB_transpose_matrix"); + GLContext.initNativeStubs(ARBVertexBlend.class, supported_extensions, "GL_ARB_vertex_blend"); + GLContext.initNativeStubs(ARBVertexProgram.class, supported_extensions, "GL_ARB_vertex_program"); + GLContext.initNativeStubs(ARBVertexShader.class, supported_extensions, "GL_ARB_vertex_shader"); + GLContext.initNativeStubs(ARBWindowPos.class, supported_extensions, "GL_ARB_window_pos"); + GLContext.initNativeStubs(ATIDrawBuffers.class, supported_extensions, "GL_ATI_draw_buffers"); + GLContext.initNativeStubs(ATIElementArray.class, supported_extensions, "GL_ATI_element_array"); + GLContext.initNativeStubs(ATIEnvmapBumpmap.class, supported_extensions, "GL_ATI_envmap_bumpmap"); + GLContext.initNativeStubs(ATIFragmentShader.class, supported_extensions, "GL_ATI_fragment_shader"); + GLContext.initNativeStubs(ATIMapObjectBuffer.class, supported_extensions, "GL_ATI_map_object_buffer"); + GLContext.initNativeStubs(ATIPnTriangles.class, supported_extensions, "GL_ATI_pn_triangles"); + GLContext.initNativeStubs(ATISeparateStencil.class, supported_extensions, "GL_ATI_separate_stencil"); + GLContext.initNativeStubs(ATIVertexArrayObject.class, supported_extensions, "GL_ATI_vertex_array_object"); + GLContext.initNativeStubs(ATIVertexAttribArrayObject.class, supported_extensions, "GL_ATI_vertex_attrib_array_object"); + GLContext.initNativeStubs(ATIVertexStreams.class, supported_extensions, "GL_ATI_vertex_streams"); + GLContext.initNativeStubs(EXTBlendEquationSeparate.class, supported_extensions, "GL_EXT_blend_equation_separate"); + GLContext.initNativeStubs(EXTBlendFuncSeparate.class, supported_extensions, "GL_EXT_blend_func_separate"); + GLContext.initNativeStubs(EXTCompiledVertexArray.class, supported_extensions, "GL_EXT_compiled_vertex_array"); + GLContext.initNativeStubs(EXTDepthBoundsTest.class, supported_extensions, "GL_EXT_depth_bounds_test"); + GLContext.initNativeStubs(EXTDrawRangeElements.class, supported_extensions, "GL_EXT_draw_range_elements"); + GLContext.initNativeStubs(EXTFogCoord.class, supported_extensions, "GL_EXT_fog_coord"); + GLContext.initNativeStubs(EXTFramebufferObject.class, supported_extensions, "GL_EXT_framebuffer_object"); + GLContext.initNativeStubs(EXTMultiDrawArrays.class, supported_extensions, "GL_EXT_multi_draw_arrays"); + GLContext.initNativeStubs(EXTPalettedTexture.class, supported_extensions, "GL_EXT_paletted_texture"); + GLContext.initNativeStubs(EXTPointParameters.class, supported_extensions, "GL_EXT_point_parameters"); + GLContext.initNativeStubs(EXTSecondaryColor.class, supported_extensions, "GL_EXT_secondary_color"); + GLContext.initNativeStubs(EXTStencilTwoSide.class, supported_extensions, "GL_EXT_stencil_two_side"); + GLContext.initNativeStubs(EXTVertexShader.class, supported_extensions, "GL_EXT_vertex_shader"); + GLContext.initNativeStubs(EXTVertexWeighting.class, supported_extensions, "GL_EXT_vertex_weighting"); + GLContext.initNativeStubs(GL12.class, supported_extensions, "OpenGL12"); + GLContext.initNativeStubs(GL13.class, supported_extensions, "OpenGL13"); + GLContext.initNativeStubs(GL14.class, supported_extensions, "OpenGL14"); + GLContext.initNativeStubs(GL15.class, supported_extensions, "OpenGL15"); + GLContext.initNativeStubs(GL20.class, supported_extensions, "OpenGL20"); + GLContext.initNativeStubs(NVEvaluators.class, supported_extensions, "GL_NV_evaluators"); + GLContext.initNativeStubs(NVFence.class, supported_extensions, "GL_NV_fence"); + GLContext.initNativeStubs(NVFragmentProgram.class, supported_extensions, "GL_NV_fragment_program"); + GLContext.initNativeStubs(NVHalfFloat.class, supported_extensions, "GL_NV_half_float"); + GLContext.initNativeStubs(NVOcclusionQuery.class, supported_extensions, "GL_NV_occlusion_query"); + GLContext.initNativeStubs(NVPixelDataRange.class, supported_extensions, "GL_NV_pixel_data_range"); + GLContext.initNativeStubs(NVPointSprite.class, supported_extensions, "GL_NV_point_sprite"); + GLContext.initNativeStubs(NVPrimitiveRestart.class, supported_extensions, "GL_NV_primitive_restart"); + GLContext.initNativeStubs(NVProgram.class, supported_extensions, "GL_NV_program"); + GLContext.initNativeStubs(NVRegisterCombiners.class, supported_extensions, "GL_NV_register_combiners"); + GLContext.initNativeStubs(NVRegisterCombiners2.class, supported_extensions, "GL_NV_register_combiners2"); + GLContext.initNativeStubs(NVVertexArrayRange.class, supported_extensions, "GL_NV_vertex_array_range"); + GLContext.initNativeStubs(NVVertexProgram.class, supported_extensions, "GL_NV_vertex_program"); + return supported_extensions; + } + + static void unloadAllStubs() { + GLContext.resetNativeStubs(ARBBufferObject.class); + GLContext.resetNativeStubs(ARBColorBufferFloat.class); + GLContext.resetNativeStubs(ARBDrawBuffers.class); + GLContext.resetNativeStubs(ARBImaging.class); + GLContext.resetNativeStubs(ARBMatrixPalette.class); + GLContext.resetNativeStubs(ARBMultisample.class); + GLContext.resetNativeStubs(ARBMultitexture.class); + GLContext.resetNativeStubs(ARBOcclusionQuery.class); + GLContext.resetNativeStubs(ARBPointParameters.class); + GLContext.resetNativeStubs(ARBProgram.class); + GLContext.resetNativeStubs(ARBShaderObjects.class); + GLContext.resetNativeStubs(ARBTextureCompression.class); + GLContext.resetNativeStubs(ARBTransposeMatrix.class); + GLContext.resetNativeStubs(ARBVertexBlend.class); + GLContext.resetNativeStubs(ARBVertexProgram.class); + GLContext.resetNativeStubs(ARBVertexShader.class); + GLContext.resetNativeStubs(ARBWindowPos.class); + GLContext.resetNativeStubs(ATIDrawBuffers.class); + GLContext.resetNativeStubs(ATIElementArray.class); + GLContext.resetNativeStubs(ATIEnvmapBumpmap.class); + GLContext.resetNativeStubs(ATIFragmentShader.class); + GLContext.resetNativeStubs(ATIMapObjectBuffer.class); + GLContext.resetNativeStubs(ATIPnTriangles.class); + GLContext.resetNativeStubs(ATISeparateStencil.class); + GLContext.resetNativeStubs(ATIVertexArrayObject.class); + GLContext.resetNativeStubs(ATIVertexAttribArrayObject.class); + GLContext.resetNativeStubs(ATIVertexStreams.class); + GLContext.resetNativeStubs(EXTBlendEquationSeparate.class); + GLContext.resetNativeStubs(EXTBlendFuncSeparate.class); + GLContext.resetNativeStubs(EXTCompiledVertexArray.class); + GLContext.resetNativeStubs(EXTDepthBoundsTest.class); + GLContext.resetNativeStubs(EXTDrawRangeElements.class); + GLContext.resetNativeStubs(EXTFogCoord.class); + GLContext.resetNativeStubs(EXTFramebufferObject.class); + GLContext.resetNativeStubs(EXTMultiDrawArrays.class); + GLContext.resetNativeStubs(EXTPalettedTexture.class); + GLContext.resetNativeStubs(EXTPointParameters.class); + GLContext.resetNativeStubs(EXTSecondaryColor.class); + GLContext.resetNativeStubs(EXTStencilTwoSide.class); + GLContext.resetNativeStubs(EXTVertexShader.class); + GLContext.resetNativeStubs(EXTVertexWeighting.class); + GLContext.resetNativeStubs(GL11.class); + GLContext.resetNativeStubs(GL12.class); + GLContext.resetNativeStubs(GL13.class); + GLContext.resetNativeStubs(GL14.class); + GLContext.resetNativeStubs(GL15.class); + GLContext.resetNativeStubs(GL20.class); + GLContext.resetNativeStubs(NVEvaluators.class); + GLContext.resetNativeStubs(NVFence.class); + GLContext.resetNativeStubs(NVFragmentProgram.class); + GLContext.resetNativeStubs(NVHalfFloat.class); + GLContext.resetNativeStubs(NVOcclusionQuery.class); + GLContext.resetNativeStubs(NVPixelDataRange.class); + GLContext.resetNativeStubs(NVPointSprite.class); + GLContext.resetNativeStubs(NVPrimitiveRestart.class); + GLContext.resetNativeStubs(NVProgram.class); + GLContext.resetNativeStubs(NVRegisterCombiners.class); + GLContext.resetNativeStubs(NVRegisterCombiners2.class); + GLContext.resetNativeStubs(NVVertexArrayRange.class); + GLContext.resetNativeStubs(NVVertexProgram.class); + } + + ContextCapabilities(Set supported_extensions) { + 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"); + this.GL_ARB_fragment_program = supported_extensions.contains("GL_ARB_fragment_program") + && supported_extensions.contains("GL_ARB_program"); + this.GL_ARB_fragment_program_shadow = supported_extensions.contains("GL_ARB_fragment_program_shadow"); + this.GL_ARB_fragment_shader = supported_extensions.contains("GL_ARB_fragment_shader"); + this.GL_ARB_half_float_pixel = supported_extensions.contains("GL_ARB_half_float_pixel"); + this.GL_ARB_imaging = supported_extensions.contains("GL_ARB_imaging"); + this.GL_ARB_matrix_palette = supported_extensions.contains("GL_ARB_matrix_palette"); + this.GL_ARB_multisample = supported_extensions.contains("GL_ARB_multisample"); + this.GL_ARB_multitexture = supported_extensions.contains("GL_ARB_multitexture"); + this.GL_ARB_occlusion_query = supported_extensions.contains("GL_ARB_occlusion_query"); + this.GL_ARB_pixel_buffer_object = supported_extensions.contains("GL_ARB_pixel_buffer_object") + && supported_extensions.contains("GL_ARB_buffer_object"); + this.GL_ARB_point_parameters = supported_extensions.contains("GL_ARB_point_parameters"); + this.GL_ARB_point_sprite = supported_extensions.contains("GL_ARB_point_sprite"); + this.GL_ARB_shader_objects = supported_extensions.contains("GL_ARB_shader_objects"); + this.GL_ARB_shading_language_100 = supported_extensions.contains("GL_ARB_shading_language_100"); + this.GL_ARB_shadow = supported_extensions.contains("GL_ARB_shadow"); + this.GL_ARB_shadow_ambient = supported_extensions.contains("GL_ARB_shadow_ambient"); + this.GL_ARB_texture_border_clamp = supported_extensions.contains("GL_ARB_texture_border_clamp"); + this.GL_ARB_texture_compression = supported_extensions.contains("GL_ARB_texture_compression"); + this.GL_ARB_texture_cube_map = supported_extensions.contains("GL_ARB_texture_cube_map"); + this.GL_ARB_texture_env_add = supported_extensions.contains("GL_ARB_texture_env_add"); + this.GL_ARB_texture_env_combine = supported_extensions.contains("GL_ARB_texture_env_combine"); + this.GL_ARB_texture_env_crossbar = supported_extensions.contains("GL_ARB_texture_env_crossbar"); + this.GL_ARB_texture_env_dot3 = supported_extensions.contains("GL_ARB_texture_env_dot3"); + this.GL_ARB_texture_float = supported_extensions.contains("GL_ARB_texture_float"); + this.GL_ARB_texture_mirrored_repeat = supported_extensions.contains("GL_ARB_texture_mirrored_repeat"); + this.GL_ARB_texture_non_power_of_two = supported_extensions.contains("GL_ARB_texture_non_power_of_two"); + this.GL_ARB_texture_rectangle = supported_extensions.contains("GL_ARB_texture_rectangle"); + this.GL_ARB_transpose_matrix = supported_extensions.contains("GL_ARB_transpose_matrix"); + this.GL_ARB_vertex_blend = supported_extensions.contains("GL_ARB_vertex_blend"); + this.GL_ARB_vertex_buffer_object = supported_extensions.contains("GL_ARB_vertex_buffer_object") + && supported_extensions.contains("GL_ARB_buffer_object"); + this.GL_ARB_vertex_program = supported_extensions.contains("GL_ARB_vertex_program") + && supported_extensions.contains("GL_ARB_program"); + this.GL_ARB_vertex_shader = supported_extensions.contains("GL_ARB_vertex_shader"); + this.GL_ARB_window_pos = supported_extensions.contains("GL_ARB_window_pos"); + this.GL_ATI_draw_buffers = supported_extensions.contains("GL_ATI_draw_buffers"); + this.GL_ATI_element_array = supported_extensions.contains("GL_ATI_element_array"); + this.GL_ATI_envmap_bumpmap = supported_extensions.contains("GL_ATI_envmap_bumpmap"); + this.GL_ATI_fragment_shader = supported_extensions.contains("GL_ATI_fragment_shader"); + this.GL_ATI_map_object_buffer = supported_extensions.contains("GL_ATI_map_object_buffer"); + this.GL_ATI_pn_triangles = supported_extensions.contains("GL_ATI_pn_triangles"); + this.GL_ATI_separate_stencil = supported_extensions.contains("GL_ATI_separate_stencil"); + this.GL_ATI_texture_compression_3dc = supported_extensions.contains("GL_ATI_texture_compression_3dc"); + this.GL_ATI_texture_float = supported_extensions.contains("GL_ATI_texture_float"); + this.GL_ATI_texture_mirror_once = supported_extensions.contains("GL_ATI_texture_mirror_once"); + this.GL_ATI_vertex_array_object = supported_extensions.contains("GL_ATI_vertex_array_object"); + this.GL_ATI_vertex_attrib_array_object = supported_extensions.contains("GL_ATI_vertex_attrib_array_object"); + this.GL_ATI_vertex_streams = supported_extensions.contains("GL_ATI_vertex_streams"); + this.GL_EXT_abgr = supported_extensions.contains("GL_EXT_abgr"); + this.GL_EXT_bgra = supported_extensions.contains("GL_EXT_bgra"); + this.GL_EXT_blend_equation_separate = supported_extensions.contains("GL_EXT_blend_equation_separate"); + this.GL_EXT_blend_func_separate = supported_extensions.contains("GL_EXT_blend_func_separate"); + this.GL_EXT_blend_subtract = supported_extensions.contains("GL_EXT_blend_subtract"); + this.GL_EXT_cg_shader = supported_extensions.contains("GL_EXT_cg_shader"); + this.GL_EXT_compiled_vertex_array = supported_extensions.contains("GL_EXT_compiled_vertex_array"); + this.GL_EXT_depth_bounds_test = supported_extensions.contains("GL_EXT_depth_bounds_test"); + this.GL_EXT_draw_range_elements = supported_extensions.contains("GL_EXT_draw_range_elements"); + this.GL_EXT_fog_coord = supported_extensions.contains("GL_EXT_fog_coord"); + this.GL_EXT_framebuffer_object = supported_extensions.contains("GL_EXT_framebuffer_object"); + this.GL_EXT_multi_draw_arrays = supported_extensions.contains("GL_EXT_multi_draw_arrays"); + this.GL_EXT_packed_pixels = supported_extensions.contains("GL_EXT_packed_pixels"); + this.GL_EXT_paletted_texture = supported_extensions.contains("GL_EXT_paletted_texture"); + this.GL_EXT_pixel_buffer_object = supported_extensions.contains("GL_EXT_pixel_buffer_object") + && supported_extensions.contains("GL_ARB_buffer_object"); + this.GL_EXT_point_parameters = supported_extensions.contains("GL_EXT_point_parameters"); + this.GL_EXT_rescale_normal = supported_extensions.contains("GL_EXT_rescale_normal"); + this.GL_EXT_secondary_color = supported_extensions.contains("GL_EXT_secondary_color"); + this.GL_EXT_separate_specular_color = supported_extensions.contains("GL_EXT_separate_specular_color"); + this.GL_EXT_shadow_funcs = supported_extensions.contains("GL_EXT_shadow_funcs"); + this.GL_EXT_shared_texture_palette = supported_extensions.contains("GL_EXT_shared_texture_palette"); + this.GL_EXT_stencil_two_side = supported_extensions.contains("GL_EXT_stencil_two_side"); + this.GL_EXT_stencil_wrap = supported_extensions.contains("GL_EXT_stencil_wrap"); + this.GL_EXT_texture_3d = supported_extensions.contains("GL_EXT_texture_3d"); + this.GL_EXT_texture_compression_s3tc = supported_extensions.contains("GL_EXT_texture_compression_s3tc"); + this.GL_EXT_texture_env_combine = supported_extensions.contains("GL_EXT_texture_env_combine"); + this.GL_EXT_texture_env_dot3 = supported_extensions.contains("GL_EXT_texture_env_dot3"); + this.GL_EXT_texture_filter_anisotropic = supported_extensions.contains("GL_EXT_texture_filter_anisotropic"); + this.GL_EXT_texture_lod_bias = supported_extensions.contains("GL_EXT_texture_lod_bias"); + this.GL_EXT_texture_mirror_clamp = supported_extensions.contains("GL_EXT_texture_mirror_clamp"); + this.GL_EXT_texture_rectangle = supported_extensions.contains("GL_EXT_texture_rectangle"); + this.GL_EXT_vertex_shader = supported_extensions.contains("GL_EXT_vertex_shader"); + this.GL_EXT_vertex_weighting = supported_extensions.contains("GL_EXT_vertex_weighting"); + this.OpenGL11 = supported_extensions.contains("OpenGL11"); + this.OpenGL12 = supported_extensions.contains("OpenGL12"); + this.OpenGL13 = supported_extensions.contains("OpenGL13"); + this.OpenGL14 = supported_extensions.contains("OpenGL14"); + this.OpenGL15 = supported_extensions.contains("OpenGL15"); + this.OpenGL20 = supported_extensions.contains("OpenGL20"); + this.GL_HP_occlusion_test = supported_extensions.contains("GL_HP_occlusion_test"); + this.GL_IBM_rasterpos_clip = supported_extensions.contains("GL_IBM_rasterpos_clip"); + this.GL_NV_blend_square = supported_extensions.contains("GL_NV_blend_square"); + this.GL_NV_copy_depth_to_color = supported_extensions.contains("GL_NV_copy_depth_to_color"); + this.GL_NV_depth_clamp = supported_extensions.contains("GL_NV_depth_clamp"); + this.GL_NV_evaluators = supported_extensions.contains("GL_NV_evaluators"); + this.GL_NV_fence = supported_extensions.contains("GL_NV_fence"); + this.GL_NV_float_buffer = supported_extensions.contains("GL_NV_float_buffer"); + this.GL_NV_fog_distance = supported_extensions.contains("GL_NV_fog_distance"); + this.GL_NV_fragment_program = supported_extensions.contains("GL_NV_fragment_program") + && supported_extensions.contains("GL_NV_program"); + this.GL_NV_fragment_program2 = supported_extensions.contains("GL_NV_fragment_program2"); + this.GL_NV_fragment_program_option = supported_extensions.contains("GL_NV_fragment_program_option"); + this.GL_NV_half_float = supported_extensions.contains("GL_NV_half_float"); + this.GL_NV_light_max_exponent = supported_extensions.contains("GL_NV_light_max_exponent"); + this.GL_NV_multisample_filter_hint = supported_extensions.contains("GL_NV_multisample_filter_hint"); + this.GL_NV_occlusion_query = supported_extensions.contains("GL_NV_occlusion_query"); + this.GL_NV_packed_depth_stencil = supported_extensions.contains("GL_NV_packed_depth_stencil"); + this.GL_NV_pixel_data_range = supported_extensions.contains("GL_NV_pixel_data_range"); + this.GL_NV_point_sprite = supported_extensions.contains("GL_NV_point_sprite"); + this.GL_NV_primitive_restart = supported_extensions.contains("GL_NV_primitive_restart"); + this.GL_NV_register_combiners = supported_extensions.contains("GL_NV_register_combiners"); + this.GL_NV_register_combiners2 = supported_extensions.contains("GL_NV_register_combiners2"); + this.GL_NV_texgen_reflection = supported_extensions.contains("GL_NV_texgen_reflection"); + this.GL_NV_texture_compression_vtc = supported_extensions.contains("GL_NV_texture_compression_vtc"); + this.GL_NV_texture_env_combine4 = supported_extensions.contains("GL_NV_texture_env_combine4"); + this.GL_NV_texture_expand_normal = supported_extensions.contains("GL_NV_texture_expand_normal"); + this.GL_NV_texture_rectangle = supported_extensions.contains("GL_NV_texture_rectangle"); + this.GL_NV_texture_shader = supported_extensions.contains("GL_NV_texture_shader"); + this.GL_NV_texture_shader2 = supported_extensions.contains("GL_NV_texture_shader2"); + this.GL_NV_texture_shader3 = supported_extensions.contains("GL_NV_texture_shader3"); + this.GL_NV_vertex_array_range = supported_extensions.contains("GL_NV_vertex_array_range"); + this.GL_NV_vertex_array_range2 = supported_extensions.contains("GL_NV_vertex_array_range2"); + this.GL_NV_vertex_program = supported_extensions.contains("GL_NV_vertex_program") + && supported_extensions.contains("GL_NV_program"); + this.GL_NV_vertex_program1_1 = supported_extensions.contains("GL_NV_vertex_program1_1"); + this.GL_NV_vertex_program2 = supported_extensions.contains("GL_NV_vertex_program2"); + this.GL_NV_vertex_program2_option = supported_extensions.contains("GL_NV_vertex_program2_option"); + this.GL_NV_vertex_program3 = supported_extensions.contains("GL_NV_vertex_program3"); + this.GL_SUN_slice_accum = supported_extensions.contains("GL_SUN_slice_accum"); + } +} diff --git a/src/java/org/lwjgl/opengl/EXTDepthBoundsTest.java b/src/java/org/lwjgl/opengl/EXTDepthBoundsTest.java index 714e7fd2..d79717e3 100644 --- a/src/java/org/lwjgl/opengl/EXTDepthBoundsTest.java +++ b/src/java/org/lwjgl/opengl/EXTDepthBoundsTest.java @@ -7,8 +7,8 @@ import org.lwjgl.BufferChecks; import java.nio.*; public final class EXTDepthBoundsTest { - public static final int DEPTH_BOUNDS_EXT = 0x8891; - public static final int DEPTH_BOUNDS_TEST_EXT = 0x8890; + public static final int GL_DEPTH_BOUNDS_EXT = 0x8891; + public static final int GL_DEPTH_BOUNDS_TEST_EXT = 0x8890; private EXTDepthBoundsTest() { } diff --git a/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java b/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java index 8013847f..1b4a844f 100644 --- a/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java +++ b/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java @@ -15,16 +15,16 @@ public final class EXTDrawRangeElements { static native void initNativeStubs() throws LWJGLException; - public static void glDrawRangeElementsEXT(int mode, int start, int end, IntBuffer pIndices) { - GLBufferChecks.ensureElementVBOdisabled(); - BufferChecks.checkDirect(pIndices); - nglDrawRangeElementsEXT(mode, start, end, (pIndices.remaining()), GL11.GL_UNSIGNED_INT, pIndices, pIndices.position() << 2); - } public static void glDrawRangeElementsEXT(int mode, int start, int end, ShortBuffer pIndices) { GLBufferChecks.ensureElementVBOdisabled(); BufferChecks.checkDirect(pIndices); nglDrawRangeElementsEXT(mode, start, end, (pIndices.remaining()), GL11.GL_UNSIGNED_SHORT, pIndices, pIndices.position() << 1); } + public static void glDrawRangeElementsEXT(int mode, int start, int end, IntBuffer pIndices) { + GLBufferChecks.ensureElementVBOdisabled(); + BufferChecks.checkDirect(pIndices); + nglDrawRangeElementsEXT(mode, start, end, (pIndices.remaining()), GL11.GL_UNSIGNED_INT, pIndices, pIndices.position() << 2); + } public static void glDrawRangeElementsEXT(int mode, int start, int end, ByteBuffer pIndices) { GLBufferChecks.ensureElementVBOdisabled(); BufferChecks.checkDirect(pIndices); diff --git a/src/java/org/lwjgl/opengl/EXTPalettedTexture.java b/src/java/org/lwjgl/opengl/EXTPalettedTexture.java index ac0cf314..17ab27dd 100644 --- a/src/java/org/lwjgl/opengl/EXTPalettedTexture.java +++ b/src/java/org/lwjgl/opengl/EXTPalettedTexture.java @@ -40,14 +40,6 @@ public final class EXTPalettedTexture { } private static native void nglGetColorTableParameterivEXT(int target, int pname, IntBuffer params, int params_position); - public static void glGetColorTableEXT(int target, int format, int type, ShortBuffer data) { - BufferChecks.checkDirect(data); - nglGetColorTableEXT(target, format, type, data, data.position() << 1); - } - public static void glGetColorTableEXT(int target, int format, int type, FloatBuffer data) { - BufferChecks.checkDirect(data); - nglGetColorTableEXT(target, format, type, data, data.position() << 2); - } public static void glGetColorTableEXT(int target, int format, int type, ByteBuffer data) { BufferChecks.checkDirect(data); nglGetColorTableEXT(target, format, type, data, data.position()); @@ -56,16 +48,16 @@ public final class EXTPalettedTexture { BufferChecks.checkDirect(data); nglGetColorTableEXT(target, format, type, data, data.position() << 2); } + public static void glGetColorTableEXT(int target, int format, int type, ShortBuffer data) { + BufferChecks.checkDirect(data); + nglGetColorTableEXT(target, format, type, data, data.position() << 1); + } + public static void glGetColorTableEXT(int target, int format, int type, FloatBuffer data) { + BufferChecks.checkDirect(data); + nglGetColorTableEXT(target, format, type, data, data.position() << 2); + } private static native void nglGetColorTableEXT(int target, int format, int type, Buffer data, int data_position); - 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)); - nglColorSubTableEXT(target, start, count, format, type, data, data.position() << 1); - } - 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)); - nglColorSubTableEXT(target, start, count, format, type, data, data.position() << 2); - } 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)); nglColorSubTableEXT(target, start, count, format, type, data, data.position()); @@ -74,16 +66,16 @@ public final class EXTPalettedTexture { BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, count, 1, 1)); nglColorSubTableEXT(target, start, count, format, type, data, data.position() << 2); } + 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)); + nglColorSubTableEXT(target, start, count, format, type, data, data.position() << 1); + } + 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)); + nglColorSubTableEXT(target, start, count, format, type, data, data.position() << 2); + } private static native void nglColorSubTableEXT(int target, int start, int count, int format, int type, Buffer data, int data_position); - 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)); - nglColorTableEXT(target, internalFormat, width, format, type, data, data.position() << 1); - } - 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)); - nglColorTableEXT(target, internalFormat, width, format, type, data, data.position() << 2); - } 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)); nglColorTableEXT(target, internalFormat, width, format, type, data, data.position()); @@ -92,5 +84,13 @@ public final class EXTPalettedTexture { BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, width, 1, 1)); nglColorTableEXT(target, internalFormat, width, format, type, data, data.position() << 2); } + 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)); + nglColorTableEXT(target, internalFormat, width, format, type, data, data.position() << 1); + } + 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)); + nglColorTableEXT(target, internalFormat, width, format, type, data, data.position() << 2); + } private static native void nglColorTableEXT(int target, int internalFormat, int width, int format, int type, Buffer data, int data_position); } diff --git a/src/java/org/lwjgl/opengl/EXTVertexShader.java b/src/java/org/lwjgl/opengl/EXTVertexShader.java index 096a8806..a44627f5 100644 --- a/src/java/org/lwjgl/opengl/EXTVertexShader.java +++ b/src/java/org/lwjgl/opengl/EXTVertexShader.java @@ -199,20 +199,20 @@ public final class EXTVertexShader { public static native void glEnableVariantClientStateEXT(int id); - public static void glVariantPointerEXT(int id, int stride, FloatBuffer pAddr) { + public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ShortBuffer pAddr) { GLBufferChecks.ensureArrayVBOdisabled(); BufferChecks.checkDirect(pAddr); - nglVariantPointerEXT(id, GL11.GL_FLOAT, stride, pAddr, pAddr.position() << 2); + nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, pAddr, pAddr.position() << 1); } public static void glVariantPointerEXT(int id, boolean unsigned, int stride, IntBuffer pAddr) { GLBufferChecks.ensureArrayVBOdisabled(); BufferChecks.checkDirect(pAddr); nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, stride, pAddr, pAddr.position() << 2); } - public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ShortBuffer pAddr) { + public static void glVariantPointerEXT(int id, int stride, FloatBuffer pAddr) { GLBufferChecks.ensureArrayVBOdisabled(); BufferChecks.checkDirect(pAddr); - nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, pAddr, pAddr.position() << 1); + nglVariantPointerEXT(id, GL11.GL_FLOAT, stride, pAddr, pAddr.position() << 2); } public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ByteBuffer pAddr) { GLBufferChecks.ensureArrayVBOdisabled(); @@ -268,17 +268,17 @@ public final class EXTVertexShader { } private static native void nglVariantbvEXT(int id, ByteBuffer pAddr, int pAddr_position); - public static void glSetLocalConstantEXT(int id, FloatBuffer pAddr) { + public static void glSetLocalConstantEXT(int id, boolean unsigned, ShortBuffer pAddr) { BufferChecks.checkBuffer(pAddr, 4); - nglSetLocalConstantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position() << 2); + nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position() << 1); } public static void glSetLocalConstantEXT(int id, boolean unsigned, IntBuffer pAddr) { BufferChecks.checkBuffer(pAddr, 4); nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, pAddr, pAddr.position() << 2); } - public static void glSetLocalConstantEXT(int id, boolean unsigned, ShortBuffer pAddr) { + public static void glSetLocalConstantEXT(int id, FloatBuffer pAddr) { BufferChecks.checkBuffer(pAddr, 4); - nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position() << 1); + nglSetLocalConstantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position() << 2); } public static void glSetLocalConstantEXT(int id, boolean unsigned, ByteBuffer pAddr) { BufferChecks.checkBuffer(pAddr, 4); @@ -286,17 +286,17 @@ public final class EXTVertexShader { } private static native void nglSetLocalConstantEXT(int id, int type, Buffer pAddr, int pAddr_position); - public static void glSetInvariantEXT(int id, FloatBuffer pAddr) { + public static void glSetInvariantEXT(int id, boolean unsigned, ShortBuffer pAddr) { BufferChecks.checkBuffer(pAddr, 4); - nglSetInvariantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position() << 2); + nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position() << 1); } public static void glSetInvariantEXT(int id, boolean unsigned, IntBuffer pAddr) { BufferChecks.checkBuffer(pAddr, 4); nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, pAddr, pAddr.position() << 2); } - public static void glSetInvariantEXT(int id, boolean unsigned, ShortBuffer pAddr) { + public static void glSetInvariantEXT(int id, FloatBuffer pAddr) { BufferChecks.checkBuffer(pAddr, 4); - nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position() << 1); + nglSetInvariantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position() << 2); } public static void glSetInvariantEXT(int id, boolean unsigned, ByteBuffer pAddr) { BufferChecks.checkBuffer(pAddr, 4); diff --git a/src/java/org/lwjgl/opengl/GLContext.java b/src/java/org/lwjgl/opengl/GLContext.java index 4cdfa4d1..7c7485c6 100644 --- a/src/java/org/lwjgl/opengl/GLContext.java +++ b/src/java/org/lwjgl/opengl/GLContext.java @@ -51,149 +51,9 @@ import java.util.*; * @version $Revision$ */ public final class GLContext { - - /** The currently initialised context */ - private static WeakReference currentContext; - - /* - * Available extensions - */ - public static boolean GL_ARB_color_buffer_float; - public static boolean GL_ARB_depth_texture; - public static boolean GL_ARB_draw_buffers; - public static boolean GL_ARB_fragment_program; - public static boolean GL_ARB_fragment_program_shadow; - public static boolean GL_ARB_fragment_shader; - public static boolean GL_ARB_half_float_pixel; - public static boolean GL_ARB_imaging; - public static boolean GL_ARB_matrix_palette; - public static boolean GL_ARB_multisample; - public static boolean GL_ARB_multitexture; - public static boolean GL_ARB_occlusion_query; - public static boolean GL_ARB_pixel_buffer_object; - public static boolean GL_ARB_point_parameters; - public static boolean GL_ARB_point_sprite; - public static boolean GL_ARB_shading_language_100; - public static boolean GL_ARB_shader_objects; - public static boolean GL_ARB_shadow; - public static boolean GL_ARB_shadow_ambient; - public static boolean GL_ARB_texture_border_clamp; - public static boolean GL_ARB_texture_compression; - public static boolean GL_ARB_texture_cube_map; - public static boolean GL_ARB_texture_env_add; - public static boolean GL_ARB_texture_env_combine; - public static boolean GL_ARB_texture_env_crossbar; - public static boolean GL_ARB_texture_env_dot3; - public static boolean GL_ARB_texture_float; - public static boolean GL_ARB_texture_mirrored_repeat; - public static boolean GL_ARB_texture_non_power_of_two; - public static boolean GL_ARB_texture_rectangle; - public static boolean GL_ARB_transpose_matrix; - public static boolean GL_ARB_vertex_blend; - public static boolean GL_ARB_vertex_buffer_object; - public static boolean GL_ARB_vertex_program; - public static boolean GL_ARB_vertex_shader; - public static boolean GL_ARB_window_pos; - - public static boolean GL_EXT_abgr; - public static boolean GL_EXT_bgra; - public static boolean GL_EXT_blend_equation_separate; - public static boolean GL_EXT_blend_func_separate; - public static boolean GL_EXT_blend_subtract; - public static boolean GL_EXT_Cg_shader; - public static boolean GL_EXT_compiled_vertex_array; - public static boolean GL_EXT_depth_bounds_test; - public static boolean GL_EXT_draw_range_elements; - public static boolean GL_EXT_fog_coord; - public static boolean GL_EXT_framebuffer_object; - public static boolean GL_EXT_multi_draw_arrays; - public static boolean GL_EXT_packed_pixels; - public static boolean GL_EXT_paletted_texture; - public static boolean GL_EXT_pixel_buffer_object; - public static boolean GL_EXT_point_parameters; - public static boolean GL_EXT_rescale_normal; - public static boolean GL_EXT_secondary_color; - public static boolean GL_EXT_separate_specular_color; - public static boolean GL_EXT_shadow_funcs; - public static boolean GL_EXT_shared_texture_palette; - public static boolean GL_EXT_stencil_two_side; - public static boolean GL_EXT_stencil_wrap; - public static boolean GL_EXT_texture_3D; - public static boolean GL_EXT_texture_compression_s3tc; - public static boolean GL_EXT_texture_env_combine; - public static boolean GL_EXT_texture_env_dot3; - public static boolean GL_EXT_texture_filter_anisotropic; - public static boolean GL_EXT_texture_lod_bias; - public static boolean GL_EXT_texture_mirror_clamp; - public static boolean GL_EXT_texture_rectangle; - public static boolean GL_EXT_vertex_shader; - public static boolean GL_EXT_vertex_weighting; - - public static boolean GL_ATI_draw_buffers; - public static boolean GL_ATI_element_array; - public static boolean GL_ATI_envmap_bumpmap; - public static boolean GL_ATI_fragment_shader; - public static boolean GL_ATI_map_object_buffer; - public static boolean GL_ATI_pn_triangles; - public static boolean GL_ATI_separate_stencil; - public static boolean GL_ATI_texture_compression_3dc; - public static boolean GL_ATI_texture_float; - public static boolean GL_ATI_texture_mirror_once; - public static boolean GL_ATI_vertex_array_object; - public static boolean GL_ATI_vertex_streams; - public static boolean GL_ATI_vertex_attrib_array_object; - - public static boolean GL_HP_occlusion_test; - - public static boolean GL_IBM_rasterpos_clip; - - public static boolean GL_NV_blend_square; - public static boolean GL_NV_copy_depth_to_color; - public static boolean GL_NV_depth_clamp; - public static boolean GL_NV_evaluators; - public static boolean GL_NV_fence; - public static boolean GL_NV_float_buffer; - public static boolean GL_NV_fog_distance; - public static boolean GL_NV_fragment_program; - public static boolean GL_NV_fragment_program2; - public static boolean GL_NV_fragment_program_option; - public static boolean GL_NV_half_float; - public static boolean GL_NV_light_max_exponent; - public static boolean GL_NV_multisample_filter_hint; - public static boolean GL_NV_occlusion_query; - public static boolean GL_NV_packed_depth_stencil; - public static boolean GL_NV_pixel_data_range; - public static boolean GL_NV_point_sprite; - public static boolean GL_NV_primitive_restart; - public static boolean GL_NV_register_combiners; - public static boolean GL_NV_register_combiners2; - public static boolean GL_NV_texgen_reflection; - public static boolean GL_NV_texture_compression_vtc; - public static boolean GL_NV_texture_env_combine4; - public static boolean GL_NV_texture_expand_normal; - public static boolean GL_NV_texture_rectangle; - public static boolean GL_NV_texture_shader; - public static boolean GL_NV_texture_shader2; - public static boolean GL_NV_texture_shader3; - public static boolean GL_NV_vertex_array_range; - public static boolean GL_NV_vertex_array_range2; - public static boolean GL_NV_vertex_program; - public static boolean GL_NV_vertex_program1_1; - public static boolean GL_NV_vertex_program2; - public static boolean GL_NV_vertex_program2_option; - public static boolean GL_NV_vertex_program3; - - public static boolean GL_SUN_slice_accum; - - public static boolean OpenGL11; - public static boolean OpenGL12; - public static boolean OpenGL13; - public static boolean OpenGL14; - public static boolean OpenGL15; - public static boolean OpenGL20; + private static ThreadLocal current_capabilities = new ThreadLocal(); /** Map of classes that have native stubs loaded */ - private static Map exts; private static int gl_ref_count; private static boolean did_auto_load; private static boolean loaded_stubs; @@ -203,25 +63,91 @@ public final class GLContext { } /** - * Determine which extensions are available. Use this to initialize capability fields. Can only be called _after_ the Display - * context or a Pbuffer has been created (or a context from some other GL library). Using LWJGL, this method is called - * automatically for you when the LWJGL Window is created and there is no need to call it yourself. + * Get the current capabilities instance. It contains the flags used + * to test for support of a particular extension. * - * @param exts A Set of OpenGL extension string names + * @return The current capabilities instance. */ - private static void determineAvailableExtensions(Set exts) { - // Grab all the public static booleans out of this class - Field[] fields = GLContext.class.getDeclaredFields(); - for ( int i = 0; i < fields.length; i++ ) { - if ( Modifier.isStatic(fields[i].getModifiers()) && fields[i].getType().equals(boolean.class) ) { - // reset fields - try { - fields[i].setBoolean(GLContext.class, exts.contains(fields[i].getName())); - } catch (IllegalAccessException e) { - e.printStackTrace(System.err); - } + public static ContextCapabilities getCapabilities() { + return ((ContextCapabilities)current_capabilities.get()); + } + + /** + * Determine which extensions are available. Helper method to ContextCapabilities. + * + * @return A Set containing all available extension strings. + */ + static Set getSupportedExtensions() { + Set supported_extensions = new HashSet(); + String extensions_string = GL11.glGetString(GL11.GL_EXTENSIONS); + StringTokenizer tokenizer = new StringTokenizer(extensions_string); + while ( tokenizer.hasMoreTokens() ) { + String extension_string = tokenizer.nextToken(); + supported_extensions.add(extension_string); + } + String version = GL11.glGetString(GL11.GL_VERSION); + if (version == null) + throw new IllegalStateException("glGetString(GL_VERSION) returned null - possibly caused by missing current context."); + StringTokenizer version_tokenizer = new StringTokenizer(version, ". "); + String major_string = version_tokenizer.nextToken(); + String minor_string = version_tokenizer.nextToken(); + + int majorVersion = Integer.parseInt(major_string); + int minorVersion = Integer.parseInt(minor_string); + + if (majorVersion == 2) { + // ----------------------[ 2.X ]---------------------- + supported_extensions.add("OpenGL20"); + // ----------------------[ 1.X ]---------------------- + supported_extensions.add("OpenGL11"); + supported_extensions.add("OpenGL12"); + supported_extensions.add("OpenGL13"); + supported_extensions.add("OpenGL14"); + supported_extensions.add("OpenGL15"); + } else { + switch (minorVersion) { + case 5: + supported_extensions.add("OpenGL15"); + // Intentional fall through + case 4: + supported_extensions.add("OpenGL14"); + // Intentional fall through + case 3: + supported_extensions.add("OpenGL13"); + // Intentional fall through + case 2: + supported_extensions.add("OpenGL12"); + // Intentional fall through + case 1: + supported_extensions.add("OpenGL11"); } } + return supported_extensions; + } + + /** + * Helper method to ContextCapabilities. It will try to initialize the native stubs, + * and remove the given extension name from the extension set if the initialization fails. + */ + static void initNativeStubs(Class extension_class, Set supported_extensions, String ext_name) { + resetNativeStubs(extension_class); + if (supported_extensions.contains(ext_name)) { + try { + Method init_stubs_method = extension_class.getDeclaredMethod("initNativeStubs", null); + init_stubs_method.invoke(null, null); + } catch (Exception e) { + Sys.log("Failed to initialize extension " + extension_class + " - exception: " + e); + supported_extensions.remove(ext_name); + } + } + } + + private static void loadStubs() throws LWJGLException { + if (loaded_stubs) + return; + Set supported_extensions = ContextCapabilities.initAllStubs(); + current_capabilities.set(new ContextCapabilities(supported_extensions)); + loaded_stubs = true; } /** @@ -240,20 +166,13 @@ public final class GLContext { */ public static void useContext(Object context) throws LWJGLException { if ( context == null ) { - unloadStubs(); + ContextCapabilities.unloadAllStubs(); if ( did_auto_load ) unloadOpenGLLibrary(); - currentContext = null; + current_capabilities = null; BufferObjectTracker.setCurrent(null); return; } - // Is this the same as last time? - Object current = currentContext == null ? null : currentContext.get(); - if ( current == context ) { - // Yes, so we don't need to do anything. Our caps and function pointers are still valid. - return; - } - // Ok, now it's the current context. if ( gl_ref_count == 0 ) { loadOpenGLLibrary(); @@ -261,7 +180,6 @@ public final class GLContext { } try { loadStubs(); - currentContext = new WeakReference(context); BufferObjectTracker.setCurrent(context); } catch (LWJGLException e) { if ( did_auto_load ) @@ -270,139 +188,6 @@ public final class GLContext { } } - private static void getExtensionClassesAndNames(Map exts, Set exts_names) { - /* - The version number is either of the form -