diff options
author | Kenneth Russel <[email protected]> | 2008-12-16 02:38:46 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2008-12-16 02:38:46 +0000 |
commit | 14a94c810910f88d3b7214ae9be5027dc74df39f (patch) | |
tree | 35792a840d433342d190e1838c456c3242b39295 /src/classes/javax/media/opengl/awt/GLJPanel.java | |
parent | 06d146fc64d934039e55a2c00a18e1056e0d85f2 (diff) |
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
Diffstat (limited to 'src/classes/javax/media/opengl/awt/GLJPanel.java')
-rw-r--r-- | src/classes/javax/media/opengl/awt/GLJPanel.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/classes/javax/media/opengl/awt/GLJPanel.java b/src/classes/javax/media/opengl/awt/GLJPanel.java index c5877e5be..48a2c7cd9 100644 --- a/src/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/classes/javax/media/opengl/awt/GLJPanel.java @@ -786,8 +786,10 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { public void initialize() { // Fall-through path: create an offscreen context instead - offscreenDrawable = factory.createOffscreenDrawable(offscreenCaps, chooser); - offscreenDrawable.setSize(Math.max(1, panelWidth), Math.max(1, panelHeight)); + offscreenDrawable = factory.createOffscreenDrawable(offscreenCaps, + chooser, + Math.max(1, panelWidth), + Math.max(1, panelHeight)); offscreenContext = (GLContextImpl) offscreenDrawable.createContext(shareWith); offscreenContext.setSynchronized(true); isInitialized = true; @@ -820,8 +822,8 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { } public void handleReshape() { - offscreenContext.destroy(); - offscreenDrawable.setSize(Math.max(1, panelWidth), Math.max(1, panelHeight)); + destroy(); + initialize(); readBackWidthInPixels = Math.max(1, panelWidth); readBackHeightInPixels = Math.max(1, panelHeight); |