Login  Register

Managing dynamic textures

Posted by morello on Jun 03, 2011; 7:22pm
URL: https://forum.jogamp.org/Managing-dynamic-textures-tp3020910.html

I have several places were I create textures dynamically (not just the HUD I mentioned in a previous post).

Most of the examples of textures I have seen involve loading an image into a texture at init() time, and never changing it.

How do you manage a texture which can change from one frame to the next, and is dynamically created using buffered image?

I tried creating a texture in the draw method, then removing it (glDeleteTextures) at the end of the draw method, but that causes a crash in the native OpenGL. If I don't delete, I run out of memory pretty quick!

Any examples of how to do this?