aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java')
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java9
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);
}