aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-05-24 21:53:37 +0000
committerKenneth Russel <[email protected]>2005-05-24 21:53:37 +0000
commite55e12f14ce0dbdec57ef64efc77da0c8e590fe2 (patch)
tree0c375b0072a21b802653b1cc8bde11a5a69266ed /src/net/java/games/jogl
parent18aecaccffc7c1c561cb9acf5329636c793e0193 (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')
-rw-r--r--src/net/java/games/jogl/GLJPanel.java8
-rw-r--r--src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java3
2 files changed, 10 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);
}
diff --git a/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java b/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java
index b171bd209..61d62c82b 100644
--- a/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java
+++ b/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java
@@ -177,6 +177,9 @@ public class WindowsPbufferGLContext extends WindowsGLContext {
ati = true;
floatMode = GLPbuffer.ATI_FLOAT;
}
+ if (DEBUG) {
+ System.err.println("Using " + (ati ? "ATI" : "NVidia") + " floating-point extension");
+ }
}
if (useFloat && ati) {