Search code examples
openglmemory-leaks

Checking OpenGL resource leaks


So I have a rather large openGL program going, and checking for normal memory leaks (those by new and delete) is rather trivial -- just run it on valgrind.

But what is the best way to check for potential opengl leaks? Is there an opengl utility that'll tell you how many resources (e.g framebuffers) are being used at the time, or such? Or is the only way to attach a counter to every glGenBlah and glDeleteBlah pairs?


Solution

  • glIntercept does check for textures that haven't been freed, perhaps it also checks framebuffers, but if not, maybe could be easily modified to do it.