aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-12-19 00:16:19 +0100
committerSven Gothel <[email protected]>2010-12-19 00:16:19 +0100
commite1682f8cd5eab26b12c868f19ff3adc544098077 (patch)
tree7e702336820e55d00f93c02c002e4dfbde9e4168 /src/jogl/classes/com/jogamp/opengl/impl/windows/wgl
parent1a6f376b183c1463e557e8fbbfbccce5633bd520 (diff)
Debug/Cleanup: toString: print base classname only; Misc ..
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/windows/wgl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java
index 1b826e6bf..0b4933db8 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java
@@ -139,10 +139,17 @@ public class WindowsWGLContext extends GLContextImpl {
// should not happen due to 'isGLReadDrawableAvailable()' query in GLContextImpl
throw new InternalError("Given readDrawable but no driver support");
}
+ int werr = ( !ok ) ? GDI.GetLastError() : GDI.ERROR_SUCCESS;
+ if(DEBUG && !ok) {
+ Throwable t = new Throwable ("Info: wglMakeContextCurrent draw "+
+ this.toHexString(hDrawDC) + ", read " + this.toHexString(hReadDC) +
+ ", ctx " + this.toHexString(ctx) + ", werr " + werr);
+ t.printStackTrace();
+ }
if(!ok && 0==hDrawDC && 0==hReadDC) {
// Some GPU's falsely fails with a zero error code (success),
// in case this is a release context request we tolerate this
- return GDI.GetLastError() == GDI.ERROR_SUCCESS ;
+ return werr == GDI.ERROR_SUCCESS ;
}
return ok;
}