diff options
author | Sven Gothel <[email protected]> | 2011-11-05 05:51:40 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-11-05 05:51:40 +0100 |
commit | 6d57bd7717834afcd5f1dc3b60d696eda1997fe8 (patch) | |
tree | a1ad158532dafb018044bc101301901cc08473ca /src/jogl | |
parent | fe4f9f3f83cda05052549cc34fb3f7acb4eabb9c (diff) |
Cleanup ; JAWT* version flag setting based whether
Cleanup
- use Platform OS_TYPE
- ..
JAWT* version flag
- if JAWTWindow is Applet, attempt offscreenLayer if avail
- ..
Diffstat (limited to 'src/jogl')
3 files changed, 18 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java index 58c9aaaa6..6b6ce9f9e 100644 --- a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java @@ -125,7 +125,10 @@ public abstract class GLDrawableImpl implements GLDrawable { return surface; } + /** called with locked surface @ setRealized(false) */ protected void destroyHandle() {} + + /** called with locked surface @ setRealized(true) or @ lockSurface(..) when surface changed */ protected void updateHandle() {} public long getHandle() { diff --git a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java index 318d00637..1f8ba5cc4 100644 --- a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java +++ b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java @@ -146,6 +146,17 @@ public class GLGraphicsConfigurationUtil { return capsRequested; } + public static GLCapabilitiesImmutable fixSingleBufferGLCapabilities(GLCapabilitiesImmutable capsRequested) + { + if( capsRequested.getDoubleBuffered() ) { + // fix caps .. + GLCapabilities caps2 = (GLCapabilities) capsRequested.cloneMutable(); + caps2.setDoubleBuffered(false); // FIXME DBLBUFOFFSCRN + return caps2; + } + return capsRequested; + } + public static GLCapabilitiesImmutable fixOpaqueGLCapabilities(GLCapabilitiesImmutable capsRequested, boolean isOpaque) { GLCapabilities caps2 = null; diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXDrawable.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXDrawable.java index 8ef642322..8cea2a550 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXDrawable.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXDrawable.java @@ -56,14 +56,16 @@ public class X11OnscreenGLXDrawable extends X11GLXDrawable { } @SuppressWarnings("unused") + @Override public long getHandle() { if(USE_GLXWINDOW && useGLXWindow) { return glXWindow; } - return getNativeSurface().getSurfaceHandle(); + return super.getHandle(); } @SuppressWarnings("unused") + @Override protected void destroyHandle() { if(USE_GLXWINDOW && 0!=glXWindow) { GLX.glXDestroyWindow(getNativeSurface().getDisplayHandle(), glXWindow); @@ -72,7 +74,7 @@ public class X11OnscreenGLXDrawable extends X11GLXDrawable { } } - /** must be locked already */ + @Override protected void updateHandle() { if(USE_GLXWINDOW) { X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration(); |