Hello
Guest
Register
Login
1 Hour
1 Day
1 Week
1 Month
Forever
LWJGL 3.3.2 released
Menu
Home
Help
Search
Login
Register
go
LWJGL Forum
Programming
OpenGL
A question about VRAM management
« previous
next »
Print
Pages: [
1
]
A question about VRAM management
3 Replies
4727 Views
CodeBunny
562
A question about VRAM management
«
on:
February 10, 2011, 20:14:49 »
How should I manage VRAM in LWJGL? Every time I want to get rid of a texture, do I have to manually wipe it from OpenGL? If so, what's the best way of doing this?
Currently I use:
Code:
[Select]
GL11.glDeleteTextures(texture.getTextureID());
Logged
Matthias
182
Re: A question about VRAM management
«
Reply #1 on:
February 10, 2011, 21:20:06 »
That's the OpenGL way. And it also applies to VBOs, Shaders etc.
Logged
TWL - Themable Widget Library
Evil-Devil
302
Re: A question about VRAM management
«
Reply #2 on:
February 10, 2011, 22:25:02 »
Yea, you have it all the way by foot alone. A often used aproach is the reference counting. Write a resource manger that keeps track of each resource usage and free it when it isn't used anymore. Unfortunately that sounds easier than it is : /
Logged
CodeBunny
562
Re: A question about VRAM management
«
Reply #3 on:
February 11, 2011, 12:25:29 »
Yah, I thought about that, but it also could be useful to keep textures in memory for later use.
What's the appropriate OpenAL call? alDeleteBuffers()?
Logged
Print
Pages: [
1
]
« previous
next »