aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLContextImpl.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-01-23 20:36:13 +0100
committerSven Gothel <[email protected]>2015-01-23 20:36:13 +0100
commit474ada7c9fa2c9e47232abfde66353af58ea35f2 (patch)
tree48b935e48c72aaa9794ed931041032961bc8047e /src/jogl/classes/jogamp/opengl/GLContextImpl.java
parent38baef0371fc55405779590d503f6e0de10fa9cc (diff)
Misc Fix: GLContext*; Refine DEBUG output in GLDrawableFactory's createShareResource
- Fix GLContext.makeCurrent() API doc for 'throws GLException' - Fix GLContext.makeCurrentResultToString(int): CONTEXT_CURRENT_NEW -> "CONTEXT_CURRENT_NEW" - Fix GLContextImpl.setGLDrawable(..) - Catch Throwable instead of GLException to not loose other cases - Fix GLContextImpl.makeCurrent(..) - Use const l-value in branch expression - fix semantic typo: validate -> validated - Refine DEBUG output in GLDrawableFactory's createShareResource - Enable DEBUG via GLContext.DEBUG as well to ease analysis w/o drawable DEBUG output
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index e2a35efb1..bc0603268 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -277,11 +277,11 @@ public abstract class GLContextImpl extends GLContext {
drawable = (GLDrawableImpl) readWrite ;
if( isCreated() && null != drawable && drawable.isRealized() ) {
int res = CONTEXT_NOT_CURRENT;
- GLException gle = null;
+ Throwable gle = null;
try {
res = makeCurrent(true); // implicit: associateDrawable(true)
- } catch ( final GLException e ) {
- gle = e;
+ } catch ( final Throwable t ) {
+ gle = t;
} finally {
if( CONTEXT_NOT_CURRENT == res ) {
// Failure, recover and bail out w/ GLException
@@ -663,19 +663,19 @@ public abstract class GLContextImpl extends GLContext {
}
}
- if (res != CONTEXT_NOT_CURRENT) { // still locked!
+ if ( CONTEXT_NOT_CURRENT != res ) { // still locked!
if( 0 == drawable.getHandle() && !surfacelessOK ) {
if( hasRendererQuirk(GLRendererQuirks.NoSurfacelessCtx) ) {
throw new GLException(String.format("Surfaceless not supported due to quirk %s: %s",
GLRendererQuirks.toString(GLRendererQuirks.NoSurfacelessCtx), toString()));
}
if( DEBUG ) {
- System.err.println(getThreadName() +": GLContext.makeCurrent: Surfaceless OK - validate");
+ System.err.println(getThreadName() +": GLContext.makeCurrent: Surfaceless OK - validated");
}
surfacelessOK = true;
}
setCurrent(this);
- if(res == CONTEXT_CURRENT_NEW) {
+ if( CONTEXT_CURRENT_NEW == res ) {
// check if the drawable's and the GL's GLProfile are equal
// throws an GLException if not
drawable.getGLProfile().verifyEquality(gl.getGLProfile());