aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl/x11/glx
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-04-23 02:10:28 +0200
committerSven Gothel <[email protected]>2010-04-23 02:10:28 +0200
commitb62a3af2d58ff52c0341f04cdc21d069a8051d31 (patch)
tree3c491020bafd650ebe3a09f4bcbc1c6d94c1f1be /src/jogl/classes/com/jogamp/opengl/impl/x11/glx
parent2151f2179cd1ce5f0d42c3514af11a9c235762db (diff)
parent56679ab5373dc47286f741f07aeab4ec1f39c43b (diff)
Merge branch 'master' of github.com:mbien/jogl
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/x11/glx')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawable.java34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawable.java
index 2dabe774c..95dfc0a1c 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawable.java
@@ -73,25 +73,23 @@ public abstract class X11GLXDrawable extends GLDrawableImpl {
}
}
- protected void swapBuffersImpl() {
- boolean didLock = false;
- try {
- if ( !isSurfaceLocked() ) {
- // Usually the surface shall be locked within [makeCurrent .. swap .. release]
- if (lockSurface() == NativeWindow.LOCK_SURFACE_NOT_READY) {
- return;
- }
- didLock=true;
- }
-
- GLX.glXSwapBuffers(component.getDisplayHandle(), component.getSurfaceHandle());
-
- } finally {
- if(didLock) {
- unlockSurface();
- }
+ protected void swapBuffersImpl() {
+ boolean didLock = false;
+ if (!isSurfaceLocked()) {
+ // Usually the surface shall be locked within [makeCurrent .. swap .. release]
+ if (lockSurface() == NativeWindow.LOCK_SURFACE_NOT_READY) {
+ return;
+ }
+ didLock = true;
+ }
+ try {
+ GLX.glXSwapBuffers(component.getDisplayHandle(), component.getSurfaceHandle());
+ } finally {
+ if (didLock) {
+ unlockSurface();
+ }
+ }
}
- }
//---------------------------------------------------------------------------
// Internals only below this point