From a08c3c054a6b9cfe892d2516c66362083dc72290 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 28 Apr 2010 03:27:52 +0200 Subject: JOGL - Passed tests MacOSX, LinuxX64 ATI/NVidia/MesaSW, Win32(VBox - !offscreen) - timeout -> 30s - Surface validation after lock on GLContextImpl .. NEWT - declare only for MacOSX >= 10.6 --- src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/com/jogamp/opengl/impl/x11') diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java index 165f89dcc..712ac029a 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java @@ -333,12 +333,15 @@ public abstract class X11GLXContext extends GLContextImpl { // Note: Usually the surface shall be locked within [makeCurrent .. swap .. release] protected int makeCurrentImpl() throws GLException { - int lockRes = drawable.lockSurface(); boolean exceptionOccurred = false; + int lockRes = drawable.lockSurface(); try { if (lockRes == NativeWindow.LOCK_SURFACE_NOT_READY) { return CONTEXT_NOT_CURRENT; } + if (0 == drawable.getNativeWindow().getSurfaceHandle()) { + throw new GLException("drawable has invalid surface handle: "+drawable); + } return makeCurrentImplAfterLock(); } catch (RuntimeException e) { exceptionOccurred = true; -- cgit v1.2.3