aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-09-02 02:16:19 +0200
committerSven Gothel <[email protected]>2011-09-02 02:16:19 +0200
commit7cc793a3c6310085f0e2f89d425b94fe7965c79f (patch)
treebc41688c8c229ee46621097659f87950841692fd
parentf17f55189a3877928c881c7f12274e413960f600 (diff)
GLArrayDataWrapper: Allow vboTarget '0' -> no VBO
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDrawableHelper.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java
index 3cfb56bf4..4ca3825af 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java
@@ -239,7 +239,7 @@ public class GLArrayDataWrapper implements GLArrayData {
if(null == this.name ) {
throw new GLException("Not a valid array buffer index: "+index);
}
- } else if( 0 <= vboTarget ) {
+ } else if( 0 < vboTarget ) {
throw new GLException("Invalid GPUBuffer target: 0x"+Integer.toHexString(vboTarget));
}
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
index 9353479ab..5d91a5ee2 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
@@ -278,7 +278,7 @@ public class GLDrawableHelper {
return autoSwapBufferMode;
}
- private static final ThreadLocal perThreadInitAction = new ThreadLocal();
+ private static final ThreadLocal<Runnable> perThreadInitAction = new ThreadLocal<Runnable>();
/** Principal helper method which runs a Runnable with the context
made current. This could have been made part of GLContext, but a
@@ -318,7 +318,7 @@ public class GLDrawableHelper {
// other drawables' display() methods from within another one's
// FIXME: re-evaluate due to possible expensive TLS access ?
GLContext lastContext = GLContext.getCurrent();
- Runnable lastInitAction = (Runnable) perThreadInitAction.get();
+ Runnable lastInitAction = perThreadInitAction.get();
if (lastContext != null) {
lastContext.release();
}