Hi!
I have a strange expirience with the textures in my game, i’m using the TextureIO class to generate the textures from my images, first i’m creating a TextureData object which gets a buffered image with the image data, after that i create the texture using TextureIO.newTexture() with the TextureData object, everything is working nicely except that somehow the texture is hold in RAM & in VRAM when i call texture.dispose the texture gets removed from RAM & VRAM. I don’t know if it should work like this but i thought once i call TextureIO.newTexture the texture gets uploaded from RAM to the VRAM and thus isn’t resident in RAM anymore.
I also thought that the texture might hold a reference to the TextureData object which isn’t removed properly, but there isn’t a good documentation on how to use the Fluser interface provided by jogl so i havn’t tryed it yet.
here’s some code snipped how i’m doing the texture generation:
TextureData textureData = TextureIO.newTextureData( bufferedImage , true );
textureData.getBuffer( ).rewind( );
Texture texture = TextureIO.newTexture( textureData);
textureData.setBuffer(null);
i hope that someone can help me solve this problem, and if it’s not solvable i would like to know why the textures are hold in RAM & VRAM.
thanks in advance
greetings from vienna (austria)