PBO/VBO checks now query OpenGL directly instead of keeping track of the currently bound buffers
This commit is contained in:
parent
1d521cf604
commit
d633986260
|
@ -36,7 +36,6 @@ public class ARBBufferObject {
|
||||||
|
|
||||||
|
|
||||||
public static void glBindBufferARB(int target, int buffer) {
|
public static void glBindBufferARB(int target, int buffer) {
|
||||||
StateTracker.bindBuffer(target, buffer);
|
|
||||||
long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBindBufferARB_pointer;
|
long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glBindBufferARB_pointer;
|
||||||
BufferChecks.checkFunctionAddress(function_pointer);
|
BufferChecks.checkFunctionAddress(function_pointer);
|
||||||
nglBindBufferARB(target, buffer, function_pointer);
|
nglBindBufferARB(target, buffer, function_pointer);
|
||||||
|
@ -44,7 +43,6 @@ public class ARBBufferObject {
|
||||||
private static native void nglBindBufferARB(int target, int buffer, long function_pointer);
|
private static native void nglBindBufferARB(int target, int buffer, long function_pointer);
|
||||||
|
|
||||||
public static void glDeleteBuffersARB(IntBuffer buffers) {
|
public static void glDeleteBuffersARB(IntBuffer buffers) {
|
||||||
StateTracker.deleteBuffers(buffers);
|
|
||||||
long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glDeleteBuffersARB_pointer;
|
long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glDeleteBuffersARB_pointer;
|
||||||
BufferChecks.checkFunctionAddress(function_pointer);
|
BufferChecks.checkFunctionAddress(function_pointer);
|
||||||
BufferChecks.checkDirect(buffers);
|
BufferChecks.checkDirect(buffers);
|
||||||
|
|
|
@ -3,10 +3,13 @@
|
||||||
package org.lwjgl.opengl;
|
package org.lwjgl.opengl;
|
||||||
|
|
||||||
import org.lwjgl.LWJGLException;
|
import org.lwjgl.LWJGLException;
|
||||||
|
import org.lwjgl.BufferUtils;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.nio.IntBuffer;
|
||||||
|
|
||||||
public class ContextCapabilities {
|
public class ContextCapabilities {
|
||||||
final StateTracker tracker;
|
final StateTracker tracker;
|
||||||
|
final IntBuffer scratch_int_buffer = BufferUtils.createIntBuffer(16);
|
||||||
|
|
||||||
public final boolean GL_ARB_color_buffer_float;
|
public final boolean GL_ARB_color_buffer_float;
|
||||||
public final boolean GL_ARB_depth_texture;
|
public final boolean GL_ARB_depth_texture;
|
||||||
|
|
|
@ -18,8 +18,8 @@ public final class EXTPixelBufferObject extends ARBBufferObject {
|
||||||
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||||
* GetFloatv, and GetDoublev:
|
* GetFloatv, and GetDoublev:
|
||||||
*/
|
*/
|
||||||
public static final int PIXEL_PACK_BUFFER_BINDING_EXT = 0x88ed;
|
public static final int GL_PIXEL_PACK_BUFFER_BINDING_EXT = 0x88ed;
|
||||||
public static final int PIXEL_UNPACK_BUFFER_BINDING_EXT = 0x88ef;
|
public static final int GL_PIXEL_UNPACK_BUFFER_BINDING_EXT = 0x88ef;
|
||||||
|
|
||||||
private EXTPixelBufferObject() {
|
private EXTPixelBufferObject() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,6 @@ public final class GL15 {
|
||||||
|
|
||||||
|
|
||||||
public static void glBindBuffer(int target, int buffer) {
|
public static void glBindBuffer(int target, int buffer) {
|
||||||
StateTracker.bindBuffer(target, buffer);
|
|
||||||
long function_pointer = GLContext.getCapabilities().GL15_glBindBuffer_pointer;
|
long function_pointer = GLContext.getCapabilities().GL15_glBindBuffer_pointer;
|
||||||
BufferChecks.checkFunctionAddress(function_pointer);
|
BufferChecks.checkFunctionAddress(function_pointer);
|
||||||
nglBindBuffer(target, buffer, function_pointer);
|
nglBindBuffer(target, buffer, function_pointer);
|
||||||
|
@ -68,7 +67,6 @@ public final class GL15 {
|
||||||
private static native void nglBindBuffer(int target, int buffer, long function_pointer);
|
private static native void nglBindBuffer(int target, int buffer, long function_pointer);
|
||||||
|
|
||||||
public static void glDeleteBuffers(IntBuffer buffers) {
|
public static void glDeleteBuffers(IntBuffer buffers) {
|
||||||
StateTracker.deleteBuffers(buffers);
|
|
||||||
long function_pointer = GLContext.getCapabilities().GL15_glDeleteBuffers_pointer;
|
long function_pointer = GLContext.getCapabilities().GL15_glDeleteBuffers_pointer;
|
||||||
BufferChecks.checkFunctionAddress(function_pointer);
|
BufferChecks.checkFunctionAddress(function_pointer);
|
||||||
BufferChecks.checkDirect(buffers);
|
BufferChecks.checkDirect(buffers);
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
package org.lwjgl.opengl;
|
package org.lwjgl.opengl;
|
||||||
|
|
||||||
import java.nio.Buffer;
|
import java.nio.Buffer;
|
||||||
|
import java.nio.IntBuffer;
|
||||||
|
|
||||||
import org.lwjgl.BufferUtils;
|
import org.lwjgl.BufferUtils;
|
||||||
|
|
||||||
|
@ -57,51 +58,66 @@ class GLChecks {
|
||||||
return StateTracker.getReferencesStack().getReferences();
|
return StateTracker.getReferencesStack().getReferences();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean checkBufferObject(int buffer_enum, boolean state) {
|
||||||
|
IntBuffer scratch_buffer = GLContext.getCapabilities().scratch_int_buffer;
|
||||||
|
GL11.glGetInteger(buffer_enum, scratch_buffer);
|
||||||
|
boolean is_enabled = scratch_buffer.get(0) != 0;
|
||||||
|
return state == is_enabled;
|
||||||
|
}
|
||||||
|
|
||||||
/** Helper method to ensure that array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
|
/** Helper method to ensure that array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
|
||||||
static void ensureArrayVBOdisabled() {
|
static void ensureArrayVBOdisabled() {
|
||||||
if (StateTracker.getVBOArrayStack().getState() != 0)
|
if ((GLContext.getCapabilities().OpenGL15 && !checkBufferObject(GL15.GL_ARRAY_BUFFER_BINDING, false) ||
|
||||||
|
(GLContext.getCapabilities().GL_ARB_vertex_buffer_object && !checkBufferObject(ARBVertexBufferObject.GL_ARRAY_BUFFER_BINDING_ARB, false))))
|
||||||
throw new OpenGLException("Cannot use Buffers when Array Buffer Object is enabled");
|
throw new OpenGLException("Cannot use Buffers when Array Buffer Object is enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Helper method to ensure that array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
|
/** Helper method to ensure that array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
|
||||||
static void ensureArrayVBOenabled() {
|
static void ensureArrayVBOenabled() {
|
||||||
if (StateTracker.getVBOArrayStack().getState() == 0)
|
if ((GLContext.getCapabilities().OpenGL15 && !checkBufferObject(GL15.GL_ARRAY_BUFFER_BINDING, true) ||
|
||||||
|
(GLContext.getCapabilities().GL_ARB_vertex_buffer_object && !checkBufferObject(ARBVertexBufferObject.GL_ARRAY_BUFFER_BINDING_ARB, true))))
|
||||||
throw new OpenGLException("Cannot use offsets when Array Buffer Object is disabled");
|
throw new OpenGLException("Cannot use offsets when Array Buffer Object is disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Helper method to ensure that element array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
|
/** Helper method to ensure that element array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
|
||||||
static void ensureElementVBOdisabled() {
|
static void ensureElementVBOdisabled() {
|
||||||
if (StateTracker.getVBOElementStack().getState() != 0)
|
if ((GLContext.getCapabilities().OpenGL15 && !checkBufferObject(GL15.GL_ELEMENT_ARRAY_BUFFER_BINDING, false) ||
|
||||||
|
(GLContext.getCapabilities().GL_ARB_vertex_buffer_object && !checkBufferObject(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, false))))
|
||||||
throw new OpenGLException("Cannot use Buffers when Element Array Buffer Object is enabled");
|
throw new OpenGLException("Cannot use Buffers when Element Array Buffer Object is enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Helper method to ensure that element array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
|
/** Helper method to ensure that element array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
|
||||||
static void ensureElementVBOenabled() {
|
static void ensureElementVBOenabled() {
|
||||||
if (StateTracker.getVBOElementStack().getState() == 0)
|
if ((GLContext.getCapabilities().OpenGL15 && !checkBufferObject(GL15.GL_ELEMENT_ARRAY_BUFFER_BINDING, true) ||
|
||||||
|
(GLContext.getCapabilities().GL_ARB_vertex_buffer_object && !checkBufferObject(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, true))))
|
||||||
throw new OpenGLException("Cannot use offsets when Element Array Buffer Object is disabled");
|
throw new OpenGLException("Cannot use offsets when Element Array Buffer Object is disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Helper method to ensure that pixel pack buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
|
/** Helper method to ensure that pixel pack buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
|
||||||
static void ensurePackPBOdisabled() {
|
static void ensurePackPBOdisabled() {
|
||||||
if (StateTracker.getPBOPackStack().getState() != 0)
|
if ((GLContext.getCapabilities().GL_ARB_pixel_buffer_object && !checkBufferObject(ARBPixelBufferObject.GL_PIXEL_PACK_BUFFER_BINDING_ARB, false) ||
|
||||||
|
(GLContext.getCapabilities().GL_EXT_pixel_buffer_object && !checkBufferObject(EXTPixelBufferObject.GL_PIXEL_PACK_BUFFER_BINDING_EXT, false))))
|
||||||
throw new OpenGLException("Cannot use Buffers when Pixel Pack Buffer Object is enabled");
|
throw new OpenGLException("Cannot use Buffers when Pixel Pack Buffer Object is enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Helper method to ensure that pixel pack buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
|
/** Helper method to ensure that pixel pack buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
|
||||||
static void ensurePackPBOenabled() {
|
static void ensurePackPBOenabled() {
|
||||||
if (StateTracker.getPBOPackStack().getState() == 0)
|
if ((GLContext.getCapabilities().GL_ARB_pixel_buffer_object && !checkBufferObject(ARBPixelBufferObject.GL_PIXEL_PACK_BUFFER_BINDING_ARB, true) ||
|
||||||
|
(GLContext.getCapabilities().GL_EXT_pixel_buffer_object && !checkBufferObject(EXTPixelBufferObject.GL_PIXEL_PACK_BUFFER_BINDING_EXT, true))))
|
||||||
throw new OpenGLException("Cannot use offsets when Pixel Pack Buffer Object is disabled");
|
throw new OpenGLException("Cannot use offsets when Pixel Pack Buffer Object is disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Helper method to ensure that pixel unpack buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
|
/** Helper method to ensure that pixel unpack buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
|
||||||
static void ensureUnpackPBOdisabled() {
|
static void ensureUnpackPBOdisabled() {
|
||||||
if (StateTracker.getPBOUnpackStack().getState() != 0)
|
if ((GLContext.getCapabilities().GL_ARB_pixel_buffer_object && !checkBufferObject(ARBPixelBufferObject.GL_PIXEL_UNPACK_BUFFER_BINDING_ARB, false) ||
|
||||||
|
(GLContext.getCapabilities().GL_EXT_pixel_buffer_object && !checkBufferObject(EXTPixelBufferObject.GL_PIXEL_UNPACK_BUFFER_BINDING_EXT, false))))
|
||||||
throw new OpenGLException("Cannot use Buffers when Pixel Unpack Buffer Object is enabled");
|
throw new OpenGLException("Cannot use Buffers when Pixel Unpack Buffer Object is enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Helper method to ensure that pixel unpack buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
|
/** Helper method to ensure that pixel unpack buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
|
||||||
static void ensureUnpackPBOenabled() {
|
static void ensureUnpackPBOenabled() {
|
||||||
if (StateTracker.getPBOUnpackStack().getState() == 0)
|
if ((GLContext.getCapabilities().GL_ARB_pixel_buffer_object && !checkBufferObject(ARBPixelBufferObject.GL_PIXEL_UNPACK_BUFFER_BINDING_ARB, true) ||
|
||||||
|
(GLContext.getCapabilities().GL_EXT_pixel_buffer_object && !checkBufferObject(EXTPixelBufferObject.GL_PIXEL_UNPACK_BUFFER_BINDING_EXT, true))))
|
||||||
throw new OpenGLException("Cannot use offsets when Pixel Unpack Buffer Object is disabled");
|
throw new OpenGLException("Cannot use offsets when Pixel Unpack Buffer Object is disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,12 +35,6 @@ import java.nio.IntBuffer;
|
||||||
|
|
||||||
/** Track Vertex Buffer Objects by context. */
|
/** Track Vertex Buffer Objects by context. */
|
||||||
final class StateTracker {
|
final class StateTracker {
|
||||||
private final StateStack vbo_array_stack;
|
|
||||||
private final StateStack vbo_element_stack;
|
|
||||||
|
|
||||||
private final StateStack pbo_pack_stack;
|
|
||||||
private final StateStack pbo_unpack_stack;
|
|
||||||
|
|
||||||
private final ReferencesStack references_stack;
|
private final ReferencesStack references_stack;
|
||||||
|
|
||||||
private final StateStack attrib_stack;
|
private final StateStack attrib_stack;
|
||||||
|
@ -48,12 +42,6 @@ final class StateTracker {
|
||||||
StateTracker() {
|
StateTracker() {
|
||||||
int stack_size = Math.max(1, Util.glGetInteger(GL11.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH));
|
int stack_size = Math.max(1, Util.glGetInteger(GL11.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH));
|
||||||
|
|
||||||
vbo_array_stack = new StateStack(stack_size, 0);
|
|
||||||
vbo_element_stack = new StateStack(stack_size, 0);
|
|
||||||
|
|
||||||
pbo_pack_stack = new StateStack(stack_size, 0);
|
|
||||||
pbo_unpack_stack = new StateStack(stack_size, 0);
|
|
||||||
|
|
||||||
references_stack = new ReferencesStack(stack_size);
|
references_stack = new ReferencesStack(stack_size);
|
||||||
|
|
||||||
attrib_stack = new StateStack(stack_size, 0);
|
attrib_stack = new StateStack(stack_size, 0);
|
||||||
|
@ -61,10 +49,6 @@ final class StateTracker {
|
||||||
|
|
||||||
static void popAttrib() {
|
static void popAttrib() {
|
||||||
if ((getClientAttribStack().popState() & GL11.GL_CLIENT_VERTEX_ARRAY_BIT) != 0) {
|
if ((getClientAttribStack().popState() & GL11.GL_CLIENT_VERTEX_ARRAY_BIT) != 0) {
|
||||||
getVBOArrayStack().popState();
|
|
||||||
getVBOElementStack().popState();
|
|
||||||
getPBOPackStack().popState();
|
|
||||||
getPBOUnpackStack().popState();
|
|
||||||
getReferencesStack().popState();
|
getReferencesStack().popState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,63 +57,10 @@ final class StateTracker {
|
||||||
getClientAttribStack().pushState();
|
getClientAttribStack().pushState();
|
||||||
getClientAttribStack().setState(mask);
|
getClientAttribStack().setState(mask);
|
||||||
if ((mask & GL11.GL_CLIENT_VERTEX_ARRAY_BIT) != 0) {
|
if ((mask & GL11.GL_CLIENT_VERTEX_ARRAY_BIT) != 0) {
|
||||||
getVBOArrayStack().pushState();
|
|
||||||
getVBOElementStack().pushState();
|
|
||||||
getPBOPackStack().pushState();
|
|
||||||
getPBOUnpackStack().pushState();
|
|
||||||
getReferencesStack().pushState();
|
getReferencesStack().pushState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void deleteBuffers(IntBuffer buffers) {
|
|
||||||
for (int i = buffers.position(); i < buffers.limit(); i++) {
|
|
||||||
int buffer_handle = buffers.get(i);
|
|
||||||
if (getVBOArrayStack().getState() == buffer_handle)
|
|
||||||
getVBOArrayStack().setState(0);
|
|
||||||
if (getVBOElementStack().getState() == buffer_handle)
|
|
||||||
getVBOElementStack().setState(0);
|
|
||||||
if (getPBOPackStack().getState() == buffer_handle)
|
|
||||||
getPBOPackStack().setState(0);
|
|
||||||
if (getPBOUnpackStack().getState() == buffer_handle)
|
|
||||||
getPBOUnpackStack().setState(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void bindBuffer(int target, int buffer) {
|
|
||||||
switch ( target ) {
|
|
||||||
case ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB:
|
|
||||||
getVBOArrayStack().setState(buffer);
|
|
||||||
break;
|
|
||||||
case ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB:
|
|
||||||
getVBOElementStack().setState(buffer);
|
|
||||||
break;
|
|
||||||
case ARBPixelBufferObject.GL_PIXEL_PACK_BUFFER_ARB:
|
|
||||||
getPBOPackStack().setState(buffer);
|
|
||||||
break;
|
|
||||||
case ARBPixelBufferObject.GL_PIXEL_UNPACK_BUFFER_ARB:
|
|
||||||
getPBOUnpackStack().setState(buffer);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new IllegalArgumentException("Unsupported VBO target " + target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static StateStack getVBOArrayStack() {
|
|
||||||
return GLContext.getCapabilities().tracker.vbo_array_stack;
|
|
||||||
}
|
|
||||||
|
|
||||||
static StateStack getVBOElementStack() {
|
|
||||||
return GLContext.getCapabilities().tracker.vbo_element_stack;
|
|
||||||
}
|
|
||||||
|
|
||||||
static StateStack getPBOPackStack() {
|
|
||||||
return GLContext.getCapabilities().tracker.pbo_pack_stack;
|
|
||||||
}
|
|
||||||
|
|
||||||
static StateStack getPBOUnpackStack() {
|
|
||||||
return GLContext.getCapabilities().tracker.pbo_unpack_stack;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ReferencesStack getReferencesStack() {
|
static ReferencesStack getReferencesStack() {
|
||||||
return GLContext.getCapabilities().tracker.references_stack;
|
return GLContext.getCapabilities().tracker.references_stack;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,6 +65,7 @@ public class ContextCapabilitiesGenerator {
|
||||||
public static void generateClassPrologue(PrintWriter writer, boolean context_specific) {
|
public static void generateClassPrologue(PrintWriter writer, boolean context_specific) {
|
||||||
writer.println("public class " + Utils.CONTEXT_CAPS_CLASS_NAME + " {");
|
writer.println("public class " + Utils.CONTEXT_CAPS_CLASS_NAME + " {");
|
||||||
writer.println("\tfinal StateTracker tracker;");
|
writer.println("\tfinal StateTracker tracker;");
|
||||||
|
writer.println("\tfinal IntBuffer scratch_int_buffer = BufferUtils.createIntBuffer(16);");
|
||||||
writer.println();
|
writer.println();
|
||||||
if (!context_specific) {
|
if (!context_specific) {
|
||||||
writer.println("\tprivate static boolean " + STUBS_LOADED_NAME + " = false;");
|
writer.println("\tprivate static boolean " + STUBS_LOADED_NAME + " = false;");
|
||||||
|
|
|
@ -111,7 +111,9 @@ public class ContextGeneratorProcessorFactory implements AnnotationProcessorFact
|
||||||
writer.println("package org.lwjgl.opengl;");
|
writer.println("package org.lwjgl.opengl;");
|
||||||
writer.println();
|
writer.println();
|
||||||
writer.println("import org.lwjgl.LWJGLException;");
|
writer.println("import org.lwjgl.LWJGLException;");
|
||||||
|
writer.println("import org.lwjgl.BufferUtils;");
|
||||||
writer.println("import java.util.Set;");
|
writer.println("import java.util.Set;");
|
||||||
|
writer.println("import java.nio.IntBuffer;");
|
||||||
writer.println();
|
writer.println();
|
||||||
ContextCapabilitiesGenerator.generateClassPrologue(writer, context_specific);
|
ContextCapabilitiesGenerator.generateClassPrologue(writer, context_specific);
|
||||||
DeclarationFilter filter = DeclarationFilter.getFilter(InterfaceDeclaration.class);
|
DeclarationFilter filter = DeclarationFilter.getFilter(InterfaceDeclaration.class);
|
||||||
|
|
|
@ -67,10 +67,8 @@ public interface ARB_buffer_object {
|
||||||
int GL_BUFFER_MAPPED_ARB = 0x88BC;
|
int GL_BUFFER_MAPPED_ARB = 0x88BC;
|
||||||
int GL_BUFFER_MAP_POINTER_ARB = 0x88BD;
|
int GL_BUFFER_MAP_POINTER_ARB = 0x88BD;
|
||||||
|
|
||||||
@Code(" StateTracker.bindBuffer(target, buffer);")
|
|
||||||
void glBindBufferARB(@GLenum int target, @GLuint int buffer);
|
void glBindBufferARB(@GLenum int target, @GLuint int buffer);
|
||||||
|
|
||||||
@Code(" StateTracker.deleteBuffers(buffers);")
|
|
||||||
void glDeleteBuffersARB(@AutoSize("buffers") @GLsizei int n, @Const @GLuint IntBuffer buffers);
|
void glDeleteBuffersARB(@AutoSize("buffers") @GLsizei int n, @Const @GLuint IntBuffer buffers);
|
||||||
|
|
||||||
void glGenBuffersARB(@AutoSize("buffers") int n, @GLuint IntBuffer buffers);
|
void glGenBuffersARB(@AutoSize("buffers") int n, @GLuint IntBuffer buffers);
|
||||||
|
|
|
@ -45,6 +45,6 @@ public interface EXT_pixel_buffer_object extends ARB_buffer_object {
|
||||||
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||||
* GetFloatv, and GetDoublev:
|
* GetFloatv, and GetDoublev:
|
||||||
*/
|
*/
|
||||||
int PIXEL_PACK_BUFFER_BINDING_EXT = 0x88ED;
|
int GL_PIXEL_PACK_BUFFER_BINDING_EXT = 0x88ED;
|
||||||
int PIXEL_UNPACK_BUFFER_BINDING_EXT = 0x88EF;
|
int GL_PIXEL_UNPACK_BUFFER_BINDING_EXT = 0x88EF;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,10 +72,8 @@ public interface GL15 {
|
||||||
int GL_BUFFER_MAPPED = 0x88BC;
|
int GL_BUFFER_MAPPED = 0x88BC;
|
||||||
int GL_BUFFER_MAP_POINTER = 0x88BD;
|
int GL_BUFFER_MAP_POINTER = 0x88BD;
|
||||||
|
|
||||||
@Code(" StateTracker.bindBuffer(target, buffer);")
|
|
||||||
void glBindBuffer(@GLenum int target, @GLuint int buffer);
|
void glBindBuffer(@GLenum int target, @GLuint int buffer);
|
||||||
|
|
||||||
@Code(" StateTracker.deleteBuffers(buffers);")
|
|
||||||
void glDeleteBuffers(@AutoSize("buffers") @GLsizei int n, @Const @GLuint IntBuffer buffers);
|
void glDeleteBuffers(@AutoSize("buffers") @GLsizei int n, @Const @GLuint IntBuffer buffers);
|
||||||
|
|
||||||
void glGenBuffers(@AutoSize("buffers") @GLsizei int n, @GLuint IntBuffer buffers);
|
void glGenBuffers(@AutoSize("buffers") @GLsizei int n, @GLuint IntBuffer buffers);
|
||||||
|
|
Loading…
Reference in New Issue