From 8883fa885e68cd21e8b8cd3343db0580913aebdf Mon Sep 17 00:00:00 2001
From: sg215889 <sg215889@phalanx.goethel.localnet>
Date: Wed, 29 Jul 2009 09:49:33 -0700
Subject: Fix: doxygen-all-pub.cfg; Add NativeWindow: surfaceSwap() and
 surfaceUpdated(); BroadcomEGL: Use custom surfaceSwap(); GLDrawableImpl's:
 Utilize NativeWindow's surfaceSwap() and surfaceUpdated(); Fix common enum of
 GL2ES1 and GL2GL3, merge them in GL

---
 .../sun/opengl/impl/x11/glx/X11GLXDrawable.java    | 31 ++++++++++------------
 .../impl/x11/glx/X11OffscreenGLXDrawable.java      |  2 +-
 .../opengl/impl/x11/glx/X11PbufferGLXDrawable.java |  2 +-
 3 files changed, 16 insertions(+), 19 deletions(-)

(limited to 'src/jogl/classes/com/sun/opengl/impl/x11/glx')

diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java
index 738714ecb..1abc36c58 100644
--- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java
+++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java
@@ -76,26 +76,23 @@ public abstract class X11GLXDrawable extends GLDrawableImpl {
     }
   }
 
-  public void swapBuffers() throws GLException {
-    GLCapabilities caps = (GLCapabilities)getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
-    if (caps.getDoubleBuffered()) {
-        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;
+  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());
+      GLX.glXSwapBuffers(component.getDisplayHandle(), component.getSurfaceHandle());
 
-        } finally {
-          if(didLock) {
-              unlockSurface();
-          }
-        }
+    } finally {
+      if(didLock) {
+          unlockSurface();
+      }
     }
   }
 
diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java
index 51938df5f..768f6b8e8 100644
--- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java
+++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java
@@ -133,6 +133,6 @@ public class X11OffscreenGLXDrawable extends X11GLXDrawable {
       getFactoryImpl().unlockToolkit();
     }
   }
-  public void swapBuffers() throws GLException {
+  protected void swapBuffersImpl() {
   }
 }
diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
index eecd92a53..bee24fa47 100644
--- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
+++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
@@ -148,6 +148,6 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable {
     return GLPbuffer.NV_FLOAT;
   }
 
-  public void swapBuffers() throws GLException {
+  protected void swapBuffersImpl() {
   }
 }
-- 
cgit v1.2.3