Message Boards
Threads [ Previous | Next ]
Resize of GLJPanel causes old texture invalid
Resize of GLJPanel causes old texture invalid key keeper 3/5/08 10:37 PM
RE: Resize of GLJPanel causes old texture invalid key keeper 5/15/08 1:02 AM
Resize of GLJPanel causes old texture invalid
3/5/08 10:37 PM
Someone had complaint that when resizing our test demo window (http://www.100town.cn/base/cyber.jnlp) will get the model lost its material.


There is a issue about GLJPanel resizing. See (http://download.java.net/media/jogl/builds/nightly/javadoc_public/javax/media/opengl/GLJPanel.htmlhttp://download.java.net/media/jogl/builds/nightly/javadoc_public/javax/media/opengl/GLJPanel.html) for more detail.
And we also found resizing of GLJPanel also cause the the texture lost. The code
1gl.glBindTexture(GL.GL_TEXTURE_2D, texId);
will lead to an blank texture for geometry.

We had eluded this problem by regenerating a new TextureId each time when do the resizing and the change will be applied to the next published version. We wonder if the mistake is on JOGL side or opengl sides. But anyway, it is not a problem anymore.
RE: Resize of GLJPanel causes old texture invalid
5/15/08 1:02 AM as a reply to key keeper.
It seems glGenLists will also need to be re-initialed after resizing.
I am not sure. Don't get time to test it yet.
Rememeber to use glDeleteLists to delete the old list number to avoid out of memory problem.