aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes
diff options
context:
space:
mode:
authorsg215889 <[email protected]>2009-07-29 09:49:33 -0700
committersg215889 <[email protected]>2009-07-29 09:49:33 -0700
commit8883fa885e68cd21e8b8cd3343db0580913aebdf (patch)
tree3f2b97b0a5c32088290ad9702f15494b8ecd71dd /src/nativewindow/classes
parentfdd78c172dfb76ba868359b359e344eaaf08d6f8 (diff)
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
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r--src/nativewindow/classes/com/sun/nativewindow/impl/NullWindow.java6
-rw-r--r--src/nativewindow/classes/com/sun/nativewindow/impl/jawt/JAWTWindow.java6
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java18
3 files changed, 30 insertions, 0 deletions
diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/NullWindow.java b/src/nativewindow/classes/com/sun/nativewindow/impl/NullWindow.java
index c7d2acec0..48a04a3c9 100644
--- a/src/nativewindow/classes/com/sun/nativewindow/impl/NullWindow.java
+++ b/src/nativewindow/classes/com/sun/nativewindow/impl/NullWindow.java
@@ -88,6 +88,12 @@ public class NullWindow implements NativeWindow {
return lockedStack;
}
+ public boolean surfaceSwap() {
+ return false;
+ }
+
+ public void surfaceUpdated() { }
+
public long getDisplayHandle() {
return displayHandle;
}
diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/jawt/JAWTWindow.java b/src/nativewindow/classes/com/sun/nativewindow/impl/jawt/JAWTWindow.java
index a4a529c54..5ad2804c1 100644
--- a/src/nativewindow/classes/com/sun/nativewindow/impl/jawt/JAWTWindow.java
+++ b/src/nativewindow/classes/com/sun/nativewindow/impl/jawt/JAWTWindow.java
@@ -115,6 +115,12 @@ public abstract class JAWTWindow implements NativeWindow {
return lockedStack;
}
+ public boolean surfaceSwap() {
+ return false;
+ }
+
+ public void surfaceUpdated() { }
+
public long getDisplayHandle() {
return config.getScreen().getDevice().getHandle();
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java
index 2a9782c12..6a588538d 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java
@@ -111,6 +111,24 @@ public interface NativeWindow {
*/
public Exception getLockedStack();
+ /**
+ * Provide a mechanism to utilize custom (pre-) swap surface
+ * code. This method is called before the render toolkit (e.g. JOGL)
+ * swaps the buffer/surface. The implementation may itself apply the swapping,
+ * in which case true shall be returned.
+ *
+ * @return true if this method completed swapping the surface,
+ * otherwise false, in which case eg the GLDrawable
+ * implementation has to swap the code.
+ */
+ public boolean surfaceSwap();
+
+ /**
+ * Method invoked after the render toolkit (e.g. JOGL)
+ * swapped/changed the buffer/surface.
+ */
+ public void surfaceUpdated();
+
/**
* render all native window information invalid,
* as if the native window was destroyed