aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/windows')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLContext.java3
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java18
2 files changed, 11 insertions, 10 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 360bddd74..ad38f26c9 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
@@ -203,9 +203,6 @@ public class WindowsWGLContext extends GLContextImpl {
WindowsWGLDrawableFactory factory = (WindowsWGLDrawableFactory)drawable.getFactoryImpl();
GLCapabilities glCaps = drawable.getChosenGLCapabilities();
- if (drawable.getNativeWindow().getSurfaceHandle() == 0) {
- throw new GLException("Internal error: attempted to create OpenGL context without an associated drawable");
- }
// Windows can set up sharing of display lists after creation time
WindowsWGLContext other = (WindowsWGLContext) GLContextShareSet.getShareContext(this);
long share = 0;
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
index ee4592adf..70513f82d 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -73,14 +73,18 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements
loadOpenGL32Library();
- sharedDrawable = new WindowsDummyWGLDrawable(this, null);
- WindowsWGLContext ctx = (WindowsWGLContext) sharedDrawable.createContext(null);
- ctx.makeCurrent();
- canCreateGLPbuffer = ctx.getGL().isExtensionAvailable("GL_ARB_pbuffer");
- ctx.release();
- sharedContext = ctx;
+ try {
+ sharedDrawable = new WindowsDummyWGLDrawable(this, null);
+ WindowsWGLContext ctx = (WindowsWGLContext) sharedDrawable.createContext(null);
+ ctx.makeCurrent();
+ canCreateGLPbuffer = ctx.getGL().isExtensionAvailable("GL_ARB_pbuffer");
+ ctx.release();
+ sharedContext = ctx;
+ } catch (Throwable t) {
+ throw new GLException("WindowsWGLDrawableFactory - Could not initialize shared resources", t);
+ }
if(null==sharedContext) {
- throw new GLException("Couldn't init shared resources");
+ throw new GLException("WindowsWGLDrawableFactory - Shared Context is null");
}
if (DEBUG) {
System.err.println("!!! SharedContext: "+sharedContext+", pbuffer supported "+canCreateGLPbuffer);