Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When my data (vertices, textures, et cetera) is purged from VRAM, how I can know that?

share|improve this question
The question could refer to two different things: either if you can know when your deleted buffers get wiped (you can't), or if you can detect when the OS decides to destroy your buffers due to context switch or such (you can, but it's OS dependent). – Jari Komppa Sep 21 '12 at 19:33

You can't. When you destroy your OpenGL resources (textures, VBO, etc) you are telling the graphics card that you don't need that resource anymore and it can do whatever it wants with the space they used; now, the driver can instantly delete them, mark them for purging or just mark the space as available for use. This implementation is transparent to the user and you can't know when or what happens.

share|improve this answer

Data in your VRAM won't get erased unless you explicitly call the glDelete* function. Therefore, OpenGL does not contain such notifications.

If you for some reason need such notifications, you'll need to wrap all glDelete* functions in your code into functions that call a notification routine.

share|improve this answer
-1 wrong answer. Calling glDelete* doesn't mean that the VRAM will be cleared, it just deletes the OGL object reference. It's up to the driver to clear that data or leave it as-is. – r2d2rigo Sep 30 '11 at 11:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.