diff options
author | Kenneth Russel <[email protected]> | 2007-03-31 02:35:25 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2007-03-31 02:35:25 +0000 |
commit | 5b543c792f28e79e1b15da6747e68d9e0f5c8ce9 (patch) | |
tree | a230ef9c04b4039d369e05b18243c218d4f93323 /src/net | |
parent | 2ad36ffe9cf48e70c3143bbda4ae25947f7374ea (diff) |
Added msg.jar target. Added dispose() method to Texture2. Fixed small
bug just introduced in DisplayShelf causing half the images to be
skipped.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/joglutils/trunk@53 83d24430-9974-4f80-8418-2cc3294053b9
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/java/joglutils/msg/nodes/Texture2.java | 13 | ||||
-rw-r--r-- | src/net/java/joglutils/msg/test/DisplayShelfRenderer.java | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/net/java/joglutils/msg/nodes/Texture2.java b/src/net/java/joglutils/msg/nodes/Texture2.java index 122de74..02763fc 100644 --- a/src/net/java/joglutils/msg/nodes/Texture2.java +++ b/src/net/java/joglutils/msg/nodes/Texture2.java @@ -252,6 +252,19 @@ public class Texture2 extends Node { } } + /** Disposes of the OpenGL texture and/or TextureRenderer this + Texture2 node refers to. An OpenGL context must be current at + the point this method is called. */ + public void dispose() throws GLException { + disposeTexture(); + disposeTextureRenderer(); + lazyDispose(); + data = null; + subImageData = null; + dirty = false; + subImageDirty = false; + } + private synchronized void disposeTextureRenderer() { if (textureRenderer != null) { disposedRenderers.add(textureRenderer); diff --git a/src/net/java/joglutils/msg/test/DisplayShelfRenderer.java b/src/net/java/joglutils/msg/test/DisplayShelfRenderer.java index e9eb1ea..adf1263 100644 --- a/src/net/java/joglutils/msg/test/DisplayShelfRenderer.java +++ b/src/net/java/joglutils/msg/test/DisplayShelfRenderer.java @@ -296,8 +296,6 @@ public class DisplayShelfRenderer implements GLEventListener { // Add this to each rendering root imageRoot.addChild(sep); mirrorRoot.addChild(sep); - - ++i; } // Now produce the floor geometry |