diff options
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java')
-rw-r--r-- | src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java b/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java index c381f68f5..15ccc0f96 100644 --- a/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java +++ b/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java @@ -71,8 +71,17 @@ public abstract class GLDrawableImpl implements GLDrawable { } public void swapBuffers() throws GLException { + GLCapabilities caps = (GLCapabilities)component.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities(); + if (caps.getDoubleBuffered()) { + if(!component.surfaceSwap()) { + swapBuffersImpl(); + } + } + component.surfaceUpdated(); } + protected abstract void swapBuffersImpl(); + public static String toHexString(long hex) { return GLContextImpl.toHexString(hex); } |