hello,
i am currently in the phase of finishing up my game for release, and the problem is (and it always was) that the rendering is pretty laggy when moving around. what happens when moving around, is that old textures are getting disposed and new ones are getting uploaded. these textures are sometimes quite large (512x512).
using the yourkit and the netbeans profiler i could track down that a majority of the time is spent in these two functions:
com.sun.opengl.util.texture.TextureIO.newTextureData(BufferedImage, boolean)
com.sun.opengl.util.texture.TextureIO.newTexture(TextureData)
my textures come from BufferedImages of types TYPE_4BYTE_ABGR or TYPE_CUSTOM, is that maybe the reason why the upload is so slow?
(TYPE_CUSTOM is because the BufferedImages are instantiated using BufferedImage(ComponentColorModel, Raster, false, HashTable)
maybe because the bufferedimage’s format is in a different byte order the opengl texture upload has to perform some reshufflng of the bytes in the texturedata?
thanks!