fiodis
5th December 2012, 17:48
I need to delete some OpenGL shader programs and VBOs. I need to do this before the OpenGL context itself is destroyed. The best way to do this is to call some destroyVBO() function when I click the big red X in the corner of my MainWindow, but before the QGLWidget's destructor is called. Is there any event that can capture that? glut and freeGLUT have glutCloseFunc. I don't know what the equivalent for Qt is.
Alternatively I guess I could reimplement the destructor for my QGLWidget. The trouble is, I don't know what I should put in it, aside from the destroyVBO() function. I would have to reimplement whatever is inside the base widget destructor, and I don't know what that does.
Alternatively I guess I could reimplement the destructor for my QGLWidget. The trouble is, I don't know what I should put in it, aside from the destroyVBO() function. I would have to reimplement whatever is inside the base widget destructor, and I don't know what that does.