From 14a94c810910f88d3b7214ae9be5027dc74df39f Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Tue, 16 Dec 2008 02:38:46 +0000 Subject: Removed setSize(), setPosition(), setVisible(), and setFullscreen() from javax.media.opengl.NativeWindow interface as these are concerns of the window toolkit and not the OpenGL binding. Removed isVisible(), isFullscreen(), getX(), and getY(). getWidth() and getHeight() remain. Changed implementations of offscreen and pbuffer drawables and changed GLJPanel to destroy and re-create its offscreen GLDrawable upon resize rather than attempting to resize the GLDrawable directly. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1823 232f8b59-042b-4e1e-8c03-345bb8c30851 --- .../impl/windows/wgl/WindowsPbufferWGLDrawable.java | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java') 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; } -- cgit v1.2.3