From 6c72b1fc68e65bc0d4a0ee1e0442cc1637a67d01 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 14 Aug 2013 23:32:22 +0200 Subject: Fix Bug 815: GL*: Change glIsEnabled() -> glIsBound() 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" --- make/config/jogl/gl-impl-CustomJavaCode-gles1.java | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'make/config/jogl/gl-impl-CustomJavaCode-gles1.java') 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; } -- cgit v1.2.3