aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/jogl/gl-impl-CustomJavaCode-gles1.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-gles1.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-gles1.java')
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-gles1.java32
1 files changed, 16 insertions, 16 deletions
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
index 35e8b0916..5d0af6913 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
@@ -190,21 +190,21 @@ private final GLBufferSizeTracker bufferSizeTracker;
private final GLBufferStateTracker bufferStateTracker;
private final GLStateTracker glStateTracker;
-private final boolean checkBufferObject(boolean enabled,
+private final boolean checkBufferObject(boolean bound,
int state,
String kind, boolean throwException) {
final int buffer = bufferStateTracker.getBoundBufferObject(state, this);
- if (enabled) {
+ if (bound) {
if (0 == buffer) {
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 {
if (0 != buffer) {
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;
}
@@ -212,46 +212,46 @@ private final boolean checkBufferObject(boolean enabled,
return true;
}
-private final boolean checkArrayVBODisabled(boolean throwException) {
- return checkBufferObject(false, // enabled
+private final boolean checkArrayVBOUnbound(boolean throwException) {
+ return checkBufferObject(false, // bound
GL.GL_ARRAY_BUFFER,
"array vertex_buffer_object", throwException);
}
-private final boolean checkArrayVBOEnabled(boolean throwException) {
- return checkBufferObject(true, // enabled
+private final boolean checkArrayVBOBound(boolean throwException) {
+ return checkBufferObject(true, // bound
GL.GL_ARRAY_BUFFER,
"array vertex_buffer_object", throwException);
}
-private final boolean checkElementVBODisabled(boolean throwException) {
- return checkBufferObject(false, // enabled
+private final boolean checkElementVBOUnbound(boolean throwException) {
+ return checkBufferObject(false, // bound
GL.GL_ELEMENT_ARRAY_BUFFER,
"element vertex_buffer_object", throwException);
}
-private final boolean checkElementVBOEnabled(boolean throwException) {
- return checkBufferObject(true, // enabled
+private final boolean checkElementVBOBound(boolean throwException) {
+ return checkBufferObject(true, // bound
GL.GL_ELEMENT_ARRAY_BUFFER,
"element vertex_buffer_object", throwException);
}
-private final boolean checkUnpackPBODisabled(boolean throwException) {
+private final boolean checkUnpackPBOUnbound(boolean throwException) {
// PBO n/a for ES 1.1 or ES 2.0
return true;
}
-private final boolean checkUnpackPBOEnabled(boolean throwException) {
+private final boolean checkUnpackPBOBound(boolean throwException) {
// PBO n/a for ES 1.1 or ES 2.0
return false;
}
-private final boolean checkPackPBODisabled(boolean throwException) {
+private final boolean checkPackPBOUnbound(boolean throwException) {
// PBO n/a for ES 1.1 or ES 2.0
return true;
}
-private final boolean checkPackPBOEnabled(boolean throwException) {
+private final boolean checkPackPBOBound(boolean throwException) {
// PBO n/a for ES 1.1 or ES 2.0
return false;
}