Sign in to follow this  
Uphoreum

OpenGL [OGL] Disposal

Recommended Posts

While learning OpenGL, I've noticed that, at least so far, I havn't had to do any kind of cleanup involving OpenGL. Since I'm using SDL for everything else, I still have to do some clean up with that, but I don't seem to have to dispose of the OpenGL textures after I'm done or anything. Does OpenGL handle this for you? Is there anything I'm supposed to do?

Share this post


Link to post
Share on other sites
every texture you create with glGenTextures you need to delete with glDeleteTextures. Same for glGenBuffers / glDeleteBuffers.

Share this post


Link to post
Share on other sites
It is an assumption that textures, VBO and other such objects are automatically deallocated when you destroy the GL context, but for cleanliness, it's best to call those glDelete*** functions.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this