diff options
author | Sven Gothel <[email protected]> | 2010-12-17 00:15:31 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-12-17 00:15:31 +0100 |
commit | 80cef32b190f7267d1ef9af7626a1bf75dc47056 (patch) | |
tree | 542fb2d850e240e4bf594be06d0db425094f2cbc /src/jogl/classes/com | |
parent | d1640dd5121d03f3cfca8e283ca7d9d5631851eb (diff) |
debug: print thread name only; simplify mapGLVersion(..) call
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java index 2c07b4668..0caf1a92d 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java @@ -173,7 +173,7 @@ public abstract class GLContextImpl extends GLContext { if(DEBUG) { String sgl1 = (null!=this.gl)?this.gl.getClass().toString()+", "+this.gl.toString():"<null>"; String sgl2 = (null!=gl)?gl.getClass().toString()+", "+gl.toString():"<null>"; - Exception e = new Exception("Info: setGL (OpenGL "+getGLVersion()+"): "+Thread.currentThread()+", "+sgl1+" -> "+sgl2); + Exception e = new Exception("Info: setGL (OpenGL "+getGLVersion()+"): "+Thread.currentThread().getName()+", "+sgl1+" -> "+sgl2); e.printStackTrace(); } this.gl = gl; @@ -505,7 +505,9 @@ public abstract class GLContextImpl extends GLContext { GLContext.getAvailableGLVersionsSet(device)); } - mapGLVersions(device); + if ( !GLContext.getAvailableGLVersionsSet(device) ) { + mapGLVersions(device); + } int reqMajor; if(glp.isGL4()) { @@ -532,20 +534,14 @@ public abstract class GLContextImpl extends GLContext { return _ctx; } - private final void mapGLVersions(AbstractGraphicsDevice device) { - if ( !GLContext.getAvailableGLVersionsSet(device) ) { - synchronized (GLContext.deviceVersionAvailable) { - createContextARBMapVersionsAvailable(4, false /* core */); // GL4 - createContextARBMapVersionsAvailable(4, true /* compat */); // GL4bc - createContextARBMapVersionsAvailable(3, false /* core */); // GL3 - createContextARBMapVersionsAvailable(3, true /* compat */); // GL3bc - createContextARBMapVersionsAvailable(2, true /* compat */); // GL2 - GLContext.setAvailableGLVersionsSet(device); - } - } else { - if(DEBUG) { - System.err.println(getThreadName() + ": no mapping, all versions set "+device.getConnection()); - } + private final void mapGLVersions(AbstractGraphicsDevice device) { + synchronized (GLContext.deviceVersionAvailable) { + createContextARBMapVersionsAvailable(4, false /* core */); // GL4 + createContextARBMapVersionsAvailable(4, true /* compat */); // GL4bc + createContextARBMapVersionsAvailable(3, false /* core */); // GL3 + createContextARBMapVersionsAvailable(3, true /* compat */); // GL3bc + createContextARBMapVersionsAvailable(2, true /* compat */); // GL2 + GLContext.setAvailableGLVersionsSet(device); } } |