diff options
author | Kenneth Russel <[email protected]> | 2005-05-24 21:53:37 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-05-24 21:53:37 +0000 |
commit | e55e12f14ce0dbdec57ef64efc77da0c8e590fe2 (patch) | |
tree | 0c375b0072a21b802653b1cc8bde11a5a69266ed /src/net/java/games/jogl/GLJPanel.java | |
parent | 18aecaccffc7c1c561cb9acf5329636c793e0193 (diff) |
Fixed remaining bug in GLJPanel where resize operations did not cause
the underlying GLCanvas to be destroyed in the hardware-accelerated
path, so textures and display lists lingered on
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@279 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/GLJPanel.java')
-rw-r--r-- | src/net/java/games/jogl/GLJPanel.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/net/java/games/jogl/GLJPanel.java b/src/net/java/games/jogl/GLJPanel.java index 155aca639..8b0c9f383 100644 --- a/src/net/java/games/jogl/GLJPanel.java +++ b/src/net/java/games/jogl/GLJPanel.java @@ -230,7 +230,13 @@ public final class GLJPanel extends JPanel implements GLDrawable { if (!hardwareAccelerationDisabled) { if (fwidth > pbufferWidth || fheight > pbufferHeight) { // Must destroy and recreate pbuffer to fit - pbuffer.destroy(); + if (pbuffer != null) { + pbuffer.destroy(); + } + if (toplevel != null) { + toplevel.dispose(); + } + isInitialized = false; if (fwidth > pbufferWidth) { pbufferWidth = getNextPowerOf2(fwidth); } |