aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-26 13:42:38 +0100
committerSven Gothel <[email protected]>2010-11-26 13:42:38 +0100
commitbe576b98ac0d8f8309510763064485961e485a7d (patch)
treef4a4fbebf151b5414ece587ae94e9e307c093185 /src/jogl/classes/com/jogamp/opengl
parenta77abd78367fd8e172b6bae0fa742ac3c89bb243 (diff)
WGL: Add GetLastError in case external context/drawable can't be retrieved
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLContext.java6
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLDrawable.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLContext.java
index 173109db9..fd70842ac 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLContext.java
@@ -75,15 +75,15 @@ public class WindowsExternalWGLContext extends WindowsWGLContext {
protected static WindowsExternalWGLContext create(GLDrawableFactory factory, GLProfile glp) {
long hdc = WGL.wglGetCurrentDC();
if (0==hdc) {
- throw new GLException("Error: attempted to make an external GLDrawable without a drawable current");
+ throw new GLException("Error: attempted to make an external GLDrawable without a drawable current, werr " + GDI.GetLastError());
}
long ctx = WGL.wglGetCurrentContext();
if (ctx == 0) {
- throw new GLException("Error: attempted to make an external GLContext without a context current");
+ throw new GLException("Error: attempted to make an external GLContext without a context current, werr " + GDI.GetLastError());
}
int pfdID = GDI.GetPixelFormat(hdc);
if (pfdID == 0) {
- throw new GLException("Error: attempted to make an external GLContext without a valid pixelformat");
+ throw new GLException("Error: attempted to make an external GLContext without a valid pixelformat, werr " + GDI.GetLastError());
}
AbstractGraphicsScreen aScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_WINDOWS);
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLDrawable.java
index 8f41db365..66a5c80a4 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLDrawable.java
@@ -61,11 +61,11 @@ public class WindowsExternalWGLDrawable extends WindowsWGLDrawable {
protected static WindowsExternalWGLDrawable create(GLDrawableFactory factory, GLProfile glp) {
long hdc = WGL.wglGetCurrentDC();
if (0==hdc) {
- throw new GLException("Error: attempted to make an external GLDrawable without a drawable current");
+ throw new GLException("Error: attempted to make an external GLDrawable without a drawable current, werr " + GDI.GetLastError());
}
int pfdID = GDI.GetPixelFormat(hdc);
if (pfdID == 0) {
- throw new GLException("Error: attempted to make an external GLContext without a valid pixelformat");
+ throw new GLException("Error: attempted to make an external GLContext without a valid pixelformat, werr " + GDI.GetLastError());
}
AbstractGraphicsScreen aScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_WINDOWS);