aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-08-14 23:32:22 +0200
committerSven Gothel <[email protected]>2013-08-14 23:32:22 +0200
commit6c72b1fc68e65bc0d4a0ee1e0442cc1637a67d01 (patch)
tree6438ddab438d9057db36c156fa9a406603b57d45 /make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
parentc37629ea8fdcb11f7f8a18e37a4cde57d4ba6a01 (diff)
Fix Bug 815: GL*: Change glIs<Buffer>Enabled() -> glIs<Buffer>Bound() to reflect semanics - Also fix the exception message (enabled/disabled -> bound/unbound)
Reason of change: Avoid confusion and point to the cause! API change: glIsVBOArrayEnabled() -> glIsVBOArrayBound() glIsVBOElementArrayEnabled() -> glIsVBOElementArrayBound() glIsPBOPackEnabled() -> glIsPBOPackBound() glIsPBOUnpackEnabled() -> glIsPBOUnpackBound() Exception message change: "must be enabled to call this method" -> "must be bound to call this method" "must be disabled to call this method" -> "must be unbound to call this method"
Diffstat (limited to 'make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java')
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java50
1 files changed, 25 insertions, 25 deletions
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java b/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
index 6cec06d04..e4959a32d 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
@@ -280,14 +280,14 @@ private boolean haveARBVertexArrayObject;
private final boolean checkBufferObject(boolean extensionAvail,
boolean allowVAO,
- boolean enabled,
+ boolean bound,
int state,
String kind, boolean throwException) {
if ( inBeginEndPair ) {
throw new GLException("May not call this between glBegin and glEnd");
}
if ( !extensionAvail ) {
- if ( !enabled ) {
+ if ( !bound ) {
return true;
}
if(throwException) {
@@ -296,7 +296,7 @@ private final boolean checkBufferObject(boolean extensionAvail,
return false;
}
int buffer = bufferStateTracker.getBoundBufferObject(state, this);
- if ( enabled ) {
+ if ( bound ) {
if ( 0 != buffer ) {
return true;
}
@@ -307,7 +307,7 @@ private final boolean checkBufferObject(boolean extensionAvail,
}
}
if ( throwException ) {
- throw new GLException(kind + " must be enabled to call this method");
+ throw new GLException(kind + " must be bound to call this method");
}
return false;
} else {
@@ -315,84 +315,84 @@ private final boolean checkBufferObject(boolean extensionAvail,
return true;
}
if ( throwException ) {
- throw new GLException(kind + " must be disabled to call this method");
+ throw new GLException(kind + " must be unbound to call this method");
}
return false;
}
}
-private final boolean checkArrayVBODisabled(boolean throwException) {
+private final boolean checkArrayVBOUnbound(boolean throwException) {
return checkBufferObject(haveGL15 || haveARBVertexBufferObject,
haveARBVertexArrayObject, // allowVAO
- false, // enable
+ false, // bound
GL.GL_ARRAY_BUFFER,
"array vertex_buffer_object", throwException);
}
-private final boolean checkArrayVBOEnabled(boolean throwException) {
+private final boolean checkArrayVBOBound(boolean throwException) {
return checkBufferObject(haveGL15 || haveARBVertexBufferObject,
haveARBVertexArrayObject, // allowVAO
- true, // enable
+ true, // bound
GL.GL_ARRAY_BUFFER,
"array vertex_buffer_object", throwException);
}
-private final boolean checkElementVBODisabled(boolean throwException) {
+private final boolean checkElementVBOUnbound(boolean throwException) {
return checkBufferObject(haveGL15 || haveARBVertexBufferObject,
haveARBVertexArrayObject, // allowVAO
- false, // enable
+ false, // bound
GL.GL_ELEMENT_ARRAY_BUFFER,
"element vertex_buffer_object", throwException);
}
-private final boolean checkElementVBOEnabled(boolean throwException) {
+private final boolean checkElementVBOBound(boolean throwException) {
return checkBufferObject(haveGL15 || haveARBVertexBufferObject,
haveARBVertexArrayObject, // allowVAO
- true, // enable
+ true, // bound
GL.GL_ELEMENT_ARRAY_BUFFER,
"element vertex_buffer_object", throwException);
}
-private final boolean checkUnpackPBODisabled(boolean throwException) {
+private final boolean checkUnpackPBOUnbound(boolean throwException) {
return checkBufferObject(haveGL21 || haveARBPixelBufferObject || haveEXTPixelBufferObject,
false, // allowVAO
- false, // enable
+ false, // bound
GL2.GL_PIXEL_UNPACK_BUFFER,
"unpack pixel_buffer_object", throwException);
}
-private final boolean checkUnpackPBOEnabled(boolean throwException) {
+private final boolean checkUnpackPBOBound(boolean throwException) {
return checkBufferObject(haveGL21 || haveARBPixelBufferObject || haveEXTPixelBufferObject,
false, // allowVAO
- true, // enable
+ true, // bound
GL2.GL_PIXEL_UNPACK_BUFFER,
"unpack pixel_buffer_object", throwException);
}
-private final boolean checkPackPBODisabled(boolean throwException) {
+private final boolean checkPackPBOUnbound(boolean throwException) {
return checkBufferObject(haveGL21 || haveARBPixelBufferObject || haveEXTPixelBufferObject,
false, // allowVAO
- false, // enable
+ false, // bound
GL2.GL_PIXEL_PACK_BUFFER,
"pack pixel_buffer_object", throwException);
}
-private final boolean checkPackPBOEnabled(boolean throwException) {
+private final boolean checkPackPBOBound(boolean throwException) {
return checkBufferObject(haveGL21 || haveARBPixelBufferObject || haveEXTPixelBufferObject,
false, // allowVAO
- true, // enable
+ true, // bound
GL2.GL_PIXEL_PACK_BUFFER,
"pack pixel_buffer_object", throwException);
}
@Override
-public final boolean glIsPBOPackEnabled() {
- return checkPackPBOEnabled(false);
+public final boolean glIsPBOPackBound() {
+ return checkPackPBOBound(false);
}
@Override
-public final boolean glIsPBOUnpackEnabled() {
- return checkUnpackPBOEnabled(false);
+public final boolean glIsPBOUnpackBound() {
+ return checkUnpackPBOBound(false);
}
/** Entry point to C language function: <code> void * {@native glMapBuffer}(GLenum target, GLenum access); </code> <br>Part of <code>GL_VERSION_1_5</code>; <code>GL_OES_mapbuffer</code> */