aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com')
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/Window.java29
-rw-r--r--src/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java4
-rw-r--r--src/classes/com/sun/opengl/impl/GLDrawableImpl.java4
-rw-r--r--src/classes/com/sun/opengl/impl/NullWindow.java26
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java4
-rw-r--r--src/classes/com/sun/opengl/impl/jawt/JAWTWindow.java31
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java6
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java7
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java4
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java10
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java12
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsOnscreenWGLDrawable.java4
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java20
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java6
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java6
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java11
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java4
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java17
18 files changed, 62 insertions, 143 deletions
diff --git a/src/classes/com/sun/javafx/newt/Window.java b/src/classes/com/sun/javafx/newt/Window.java
index 6928c3397..b4333bf2b 100755
--- a/src/classes/com/sun/javafx/newt/Window.java
+++ b/src/classes/com/sun/javafx/newt/Window.java
@@ -289,10 +289,22 @@ public abstract class Window implements NativeWindow
return visualID;
}
- public boolean isVisible() {
- return visible;
+ public int getWidth() {
+ return width;
+ }
+
+ public int getHeight() {
+ return height;
}
+ public Object getWrappedWindow() {
+ return null;
+ }
+
+ //
+ // Additional methods
+ //
+
public int getX() {
return x;
}
@@ -301,12 +313,8 @@ public abstract class Window implements NativeWindow
return y;
}
- public int getWidth() {
- return width;
- }
-
- public int getHeight() {
- return height;
+ public boolean isVisible() {
+ return visible;
}
public boolean isFullscreen() {
@@ -314,15 +322,10 @@ public abstract class Window implements NativeWindow
}
public abstract void setVisible(boolean visible);
-
public abstract void setSize(int width, int height);
public abstract void setPosition(int x, int y);
public abstract boolean setFullscreen(boolean fullscreen);
- public Object getWrappedWindow() {
- return null;
- }
-
//
// MouseListener Support
//
diff --git a/src/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java b/src/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
index e252e3e6a..966d8a788 100644
--- a/src/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
+++ b/src/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
@@ -53,7 +53,9 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory implements
used to implement the fallback rendering path of the
GLJPanel. */
public abstract GLDrawableImpl createOffscreenDrawable(GLCapabilities capabilities,
- GLCapabilitiesChooser chooser);
+ GLCapabilitiesChooser chooser,
+ int width,
+ int height);
/** Dynamically looks up the given function. */
public abstract long dynamicLookupFunction(String glFuncName);
diff --git a/src/classes/com/sun/opengl/impl/GLDrawableImpl.java b/src/classes/com/sun/opengl/impl/GLDrawableImpl.java
index 643c9ebe5..0c60d6d09 100644
--- a/src/classes/com/sun/opengl/impl/GLDrawableImpl.java
+++ b/src/classes/com/sun/opengl/impl/GLDrawableImpl.java
@@ -108,10 +108,6 @@ public abstract class GLDrawableImpl implements GLDrawable {
return realized;
}
- public void setSize(int width, int height) {
- component.setSize(width, height);
- }
-
public int getWidth() {
return component.getWidth();
}
diff --git a/src/classes/com/sun/opengl/impl/NullWindow.java b/src/classes/com/sun/opengl/impl/NullWindow.java
index a366a734a..1cd4b4bc2 100644
--- a/src/classes/com/sun/opengl/impl/NullWindow.java
+++ b/src/classes/com/sun/opengl/impl/NullWindow.java
@@ -125,30 +125,4 @@ public class NullWindow implements NativeWindow {
public int getHeight() {
return height;
}
-
- public int getX() {
- return 0;
- }
- public int getY() {
- return 0;
- }
-
- public void setPosition(int x, int y) {
- }
-
- public void setVisible(boolean visible) {
- }
-
- public boolean isVisible() {
- return false;
- }
-
- public boolean setFullscreen(boolean fullscreen) {
- return false; // FIXME
- }
-
- public boolean isFullscreen() {
- return false; // FIXME
- }
-
}
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
index 7f7c65a78..37dd6c8fe 100755
--- a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
@@ -132,7 +132,9 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
}
public GLDrawableImpl createOffscreenDrawable(GLCapabilities capabilities,
- GLCapabilitiesChooser chooser) {
+ GLCapabilitiesChooser chooser,
+ int width,
+ int height) {
throw new GLUnsupportedException("Not yet implemented");
}
diff --git a/src/classes/com/sun/opengl/impl/jawt/JAWTWindow.java b/src/classes/com/sun/opengl/impl/jawt/JAWTWindow.java
index 905614952..b1a1d9d8e 100644
--- a/src/classes/com/sun/opengl/impl/jawt/JAWTWindow.java
+++ b/src/classes/com/sun/opengl/impl/jawt/JAWTWindow.java
@@ -143,40 +143,11 @@ public abstract class JAWTWindow implements NativeWindow {
return component.getHeight();
}
- public int getX() {
- return component.getX();
- }
- public int getY() {
- return component.getY();
- }
-
- public void setPosition(int x, int y) {
- component.setLocation(x,y);
- }
-
- public void setVisible(boolean visible) {
- component.setVisible(visible);
- }
-
- public boolean isVisible() {
- return component.isVisible();
- }
-
- public boolean setFullscreen(boolean fullscreen) {
- return false; // FIXME
- }
-
- public boolean isFullscreen() {
- return false; // FIXME
- }
-
public String toString() {
return "JAWT-Window[windowHandle "+getWindowHandle()+
", surfaceHandle "+getSurfaceHandle()+
- ", pos "+getX()+"/"+getY()+", size "+getWidth()+"x"+getHeight()+
- ", visible "+isVisible()+
+ ", size "+getWidth()+"x"+getHeight()+
", wrappedWindow "+getWrappedWindow()+
", terminalObject "+isTerminalObject()+"]";
}
-
}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
index 5e47a4bbb..3352a137c 100644
--- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
@@ -73,8 +73,10 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
}
public GLDrawableImpl createOffscreenDrawable(GLCapabilities capabilities,
- GLCapabilitiesChooser chooser) {
- return new MacOSXOffscreenCGLDrawable(this, capabilities);
+ GLCapabilitiesChooser chooser,
+ int width,
+ int height) {
+ return new MacOSXOffscreenCGLDrawable(this, capabilities, width, height);
}
public boolean canCreateGLPbuffer() {
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java
index bf3e402cc..a825e1c1e 100644
--- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java
@@ -44,8 +44,11 @@ import com.sun.opengl.impl.*;
public class MacOSXOffscreenCGLDrawable extends MacOSXPbufferCGLDrawable {
- public MacOSXOffscreenCGLDrawable(GLDrawableFactory factory, GLCapabilities capabilities) {
- super(factory, capabilities, 0, 0);
+ public MacOSXOffscreenCGLDrawable(GLDrawableFactory factory,
+ GLCapabilities capabilities,
+ int width,
+ int height) {
+ super(factory, capabilities, width, height);
}
public GLContext createContext(GLContext shareWith) {
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java
index cb2799f5c..6a42700f3 100644
--- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java
@@ -71,10 +71,6 @@ public class MacOSXOnscreenCGLDrawable extends MacOSXCGLDrawable {
return context;
}
- public void setSize(int width, int height) {
- component.setSize(width, height);
- }
-
public int getWidth() {
return component.getWidth();
}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
index b11e0f275..dfd970070 100644
--- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
@@ -55,10 +55,10 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
// semantic is that contains an NSView
protected long pBuffer;
- public MacOSXPbufferCGLDrawable(GLDrawableFactory factory, GLCapabilities capabilities, int initialWidth, int initialHeight) {
+ public MacOSXPbufferCGLDrawable(GLDrawableFactory factory, GLCapabilities capabilities, int width, int height) {
super(factory, new NullWindow(), true, capabilities, null);
NullWindow nw = (NullWindow) getNativeWindow();
- nw.setSize(initialWidth, initialHeight);
+ nw.setSize(width, height);
initOpenGLImpl();
createPbuffer();
}
@@ -83,12 +83,6 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
super.destroy();
}
- public void setSize(int width, int height) {
- super.setSize(width, height);
- destroy();
- createPbuffer();
- }
-
public long getPbuffer() {
return pBuffer;
}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java
index 8dded7069..38215fd46 100644
--- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java
@@ -48,20 +48,18 @@ public class WindowsOffscreenWGLDrawable extends WindowsWGLDrawable {
public WindowsOffscreenWGLDrawable(GLDrawableFactory factory,
GLCapabilities requestedCapabilities,
- GLCapabilitiesChooser chooser) {
+ GLCapabilitiesChooser chooser,
+ int width,
+ int height) {
super(factory, new NullWindow(), true, requestedCapabilities, chooser);
+ ((NullWindow) getNativeWindow()).setSize(width, height);
+ create();
}
public GLContext createContext(GLContext shareWith) {
return new WindowsOffscreenWGLContext(this, shareWith);
}
- public void setSize(int newWidth, int newHeight) {
- super.setSize(newWidth, newHeight);
- destroy();
- create();
- }
-
private void create() {
getFactoryImpl().lockToolkit();
try {
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOnscreenWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOnscreenWGLDrawable.java
index 145858d5d..52812f0e9 100644
--- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOnscreenWGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOnscreenWGLDrawable.java
@@ -62,10 +62,6 @@ public class WindowsOnscreenWGLDrawable extends WindowsWGLDrawable {
return new WindowsOnscreenWGLContext(this, shareWith);
}
- public void setSize(int width, int height) {
- component.setSize(width, height);
- }
-
public int getWidth() {
return component.getWidth();
}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java
index 40e46a232..f82653bcd 100644
--- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java
@@ -52,17 +52,17 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
public WindowsPbufferWGLDrawable(GLDrawableFactory factory,
GLCapabilities requestedCapabilities,
- int initialWidth,
- int initialHeight,
+ int width,
+ int height,
WindowsWGLDrawable dummyDrawable,
WGLExt wglExt) {
super(factory, new NullWindow(), true, requestedCapabilities, null);
- if (initialWidth <= 0 || initialHeight <= 0) {
- throw new GLException("Initial width and height of pbuffer must be positive (were (" +
- initialWidth + ", " + initialHeight + "))");
+ if (width <= 0 || height <= 0) {
+ throw new GLException("Width and height of pbuffer must be positive (were (" +
+ width + ", " + height + "))");
}
NullWindow nw = (NullWindow) getNativeWindow();
- nw.setSize(initialWidth, initialHeight);
+ nw.setSize(width, height);
if (DEBUG) {
System.out.println("Pbuffer caps on init: " + requestedCapabilities +
@@ -104,14 +104,6 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
super.destroy();
}
- public void setSize(int newWidth, int newHeight) {
- super.setSize(newWidth, newHeight);
- destroy();
- if(cachedParentHdc!=0 && cachedWGLExt!=null) {
- createPbuffer(cachedParentHdc, cachedWGLExt);
- }
- }
-
public long getPbuffer() {
return buffer;
}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
index 762714690..4fe0900a6 100644
--- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -80,8 +80,10 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
}
public GLDrawableImpl createOffscreenDrawable(GLCapabilities capabilities,
- GLCapabilitiesChooser chooser) {
- return new WindowsOffscreenWGLDrawable(this, capabilities, chooser);
+ GLCapabilitiesChooser chooser,
+ int width,
+ int height) {
+ return new WindowsOffscreenWGLDrawable(this, capabilities, chooser, width, height);
}
private boolean pbufferSupportInitialized = false;
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java
index 22ba775ec..75011ec88 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java
@@ -116,8 +116,10 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
}
public GLDrawableImpl createOffscreenDrawable(GLCapabilities capabilities,
- GLCapabilitiesChooser chooser) {
- return new X11OffscreenGLXDrawable(this, capabilities, chooser);
+ GLCapabilitiesChooser chooser,
+ int width,
+ int height) {
+ return new X11OffscreenGLXDrawable(this, capabilities, chooser, width, height);
}
private boolean pbufferSupportInitialized = false;
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java
index 77aa03a83..bd2eb9921 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java
@@ -49,20 +49,17 @@ public class X11OffscreenGLXDrawable extends X11GLXDrawable {
protected X11OffscreenGLXDrawable(GLDrawableFactory factory,
GLCapabilities requestedCapabilities,
- GLCapabilitiesChooser chooser) {
+ GLCapabilitiesChooser chooser,
+ int width,
+ int height) {
super(factory, new NullWindow(), true, requestedCapabilities, chooser);
+ ((NullWindow) getNativeWindow()).setSize(width, height);
}
public GLContext createContext(GLContext shareWith) {
return new X11OffscreenGLXContext(this, shareWith);
}
- public void setSize(int newWidth, int newHeight) {
- super.setSize(newWidth, newHeight);
- destroy();
- create();
- }
-
private void create() {
NullWindow nw = (NullWindow) getNativeWindow();
long dpy = X11GLXDrawableFactory.getDisplayConnection();
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java
index fc3460480..23835f21b 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java
@@ -52,10 +52,6 @@ public class X11OnscreenGLXDrawable extends X11GLXDrawable {
return new X11OnscreenGLXContext(this, shareWith);
}
- public void setSize(int width, int height) {
- component.setSize(width, height);
- }
-
public int getWidth() {
return component.getWidth();
}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
index 26a1ae932..3df6d486a 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
@@ -54,14 +54,14 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable {
protected X11PbufferGLXDrawable(GLDrawableFactory factory,
GLCapabilities requestedCapabilities,
- int initialWidth, int initialHeight) {
+ int width, int height) {
super(factory, new NullWindow(), true, requestedCapabilities, null);
- if (initialWidth <= 0 || initialHeight <= 0) {
- throw new GLException("Initial width and height of pbuffer must be positive (were (" +
- initialWidth + ", " + initialHeight + "))");
+ if (width <= 0 || height <= 0) {
+ throw new GLException("Width and height of pbuffer must be positive (were (" +
+ width + ", " + height + "))");
}
NullWindow nw = (NullWindow) getNativeWindow();
- nw.setSize(initialWidth, initialHeight);
+ nw.setSize(width, height);
if (DEBUG) {
System.out.println("Pbuffer caps on init: " + requestedCapabilities +
@@ -93,13 +93,6 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable {
super.destroy();
}
- public void setSize(int width, int height) {
- super.setSize(width, height);
- destroy();
- ((NullWindow)getNativeWindow()).setDisplayHandle(X11GLXDrawableFactory.getDisplayConnection());
- createPbuffer();
- }
-
private void createPbuffer() {
getFactoryImpl().lockToolkit();
try {