JOGL Textures Hogging Memory
Posted by JimmyNeutron on Aug 06, 2016; 9:19pm
URL: https://forum.jogamp.org/JOGL-Textures-Hogging-Memory-tp4037027.html
Okay, so I'd like to know what the "correct" way to load and use textures is in JOGL. I've seen a number of ways (such as Texture.bind or glGenTextures). I don't know what the correct way to do it is. For what it's worth, I am not using the "modern" OpenGL methods, but the fixed function pipeline (modern was too darn difficult to get working).
Here's the problem: I'm loading textures using AWTTextureIO.newTexture and passing it a BufferedImage. The image is 1080x1080 RGBA. Once I have the Texture, I can do one of two things that I know of:
1. Get that Texture object every frame and use Texture.bind()
2. Use Texture.getTextureObject() to get the int id for this texture.
Regardless of which one I do, Activity Monitor (I'm on a Mac, btw) shows that my program is using about 20 MB of ram for each texture I load. Is this a lot? Aren't textures supposed to stored in the GPU memory? Am I doing something wrong?