#241 Properly destroy OpenGL resources on linux

closed-fixed
nobody
general (28)
2
2012-10-22
2012-07-01
curaga
No

For a long time irr has destroyed the context before destroying the GL textures, rtts, shaders, and other resources.

This is an user error and a bug, Mesa warns about this when run with LIBGL_DEBUG=verbose.

Here's an apitrace from the RTT example, taken after applying this patch:
http://kiwi6.com/file/3xnl71pg99

As you can see, with this patch glxDestroyContext and glxDestroyWindow are correctly called _after_ destroying the GL resources, not before.

Discussion

  • Thanks, that looks correct to me. Applied to trunk (with tiny changes).

     
    • status: open --> closed-fixed
     
    • priority: 5 --> 2