summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com/sun/javafx
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/newt/classes/com/sun/javafx
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/newt/classes/com/sun/javafx')
-rwxr-xr-xsrc/newt/classes/com/sun/javafx/newt/Window.java6
-rw-r--r--src/newt/classes/com/sun/javafx/newt/opengl/GLWindow.java13
-rwxr-xr-xsrc/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java13
3 files changed, 30 insertions, 2 deletions
diff --git a/src/newt/classes/com/sun/javafx/newt/Window.java b/src/newt/classes/com/sun/javafx/newt/Window.java
index a1168d12d..e2903bd62 100755
--- a/src/newt/classes/com/sun/javafx/newt/Window.java
+++ b/src/newt/classes/com/sun/javafx/newt/Window.java
@@ -269,6 +269,12 @@ public abstract class Window implements NativeWindow
y=0;
}
+ public boolean surfaceSwap() {
+ return false;
+ }
+
+ public void surfaceUpdated() {}
+
protected void clearEventMask() {
eventMask=0;
}
diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/GLWindow.java b/src/newt/classes/com/sun/javafx/newt/opengl/GLWindow.java
index 8ecfe6216..7a7ff0859 100644
--- a/src/newt/classes/com/sun/javafx/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/sun/javafx/newt/opengl/GLWindow.java
@@ -654,6 +654,19 @@ public class GLWindow extends Window implements GLAutoDrawable {
return null;
}
+ public boolean surfaceSwap() {
+ if(null!=drawable) return drawable.getNativeWindow().surfaceSwap();
+ return super.surfaceSwap();
+ }
+
+ public void surfaceUpdated() {
+ if(null!=drawable) {
+ drawable.getNativeWindow().surfaceUpdated();
+ } else {
+ super.surfaceUpdated();
+ }
+ }
+
public long getWindowHandle() {
if(null!=drawable) return drawable.getNativeWindow().getWindowHandle();
return super.getWindowHandle();
diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java
index 10e70baa0..ddee07c49 100755
--- a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java
+++ b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java
@@ -85,10 +85,10 @@ public class BCEGLWindow extends Window {
void setSizeImpl(int width, int height) {
if(0!=windowHandle) {
// n/a in BroadcomEGL
- System.err.println("setSize n/a in BroadcomEGL with realized window");
+ System.err.println("BCEGLWindow.setSizeImpl n/a in BroadcomEGL with realized window");
} else {
if(DEBUG_IMPLEMENTATION) {
- Exception e = new Exception("BCEGLWindow.setSize() "+this.width+"x"+this.height+" -> "+width+"x"+height);
+ Exception e = new Exception("BCEGLWindow.setSizeImpl() "+this.width+"x"+this.height+" -> "+width+"x"+height);
e.printStackTrace();
}
this.width = width;
@@ -107,6 +107,14 @@ public class BCEGLWindow extends Window {
return false;
}
+ public boolean surfaceSwap() {
+ if ( 0!=windowHandle ) {
+ SwapWindow(getDisplayHandle(), windowHandle);
+ return true;
+ }
+ return false;
+ }
+
//----------------------------------------------------------------------
// Internals only
//
@@ -114,6 +122,7 @@ public class BCEGLWindow extends Window {
protected static native boolean initIDs();
private native long CreateWindow(long eglDisplayHandle, boolean chromaKey, int width, int height);
private native void CloseWindow(long eglDisplayHandle, long eglWindowHandle);
+ private native void SwapWindow(long eglDisplayHandle, long eglWindowHandle);
private long realizeWindow(boolean chromaKey, int width, int height) {