LWJGLImageGraphics.update() consumes memory

When I update mipmap texture by LWJGLImageGraphics,

It consumes memory slowly.

I found calling GLU.gluBuild2DMipmaps(LWJGLImageGraphics:128) consumes memory.

At some point, memory doesn't increase any more but memory goes up too much.

Is there any way to release previously generated mipmap?

The latest jME has support for hardware mipmap generation which doesn't use that method anymore. Perhaps the LWJGLImageGraphics class wasn't properly edited to support this change?

Momoko_Fan said:

The latest jME has support for hardware mipmap generation which doesn't use that method anymore. Perhaps the LWJGLImageGraphics class wasn't properly edited to support this change?

Thanks for the answer. :)
Then gluBuild2DMipmaps() is not needed anymore?
How is the hardware mipmap supported?
I hope it is patched to support that.

The hardware mipmap generation is somewhere around LWJGLTextureState.load(), it justs checks if its supported, and if it is, it sets glTexParameter flag GL_GENERATE_MIPMAP on the texture, otherwise it uses gluBuildMipmaps as usual. I am not sure how ImageGraphics works, but I am pretty sure it uploads the texture without LWJGLTextureState.load() which would explain the problem. If it doesn't use LWJGLTextureState.load() then you can try implementing the code from there.