Re: [AD] Open GL bitmaps

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Possible solutions are for each display to manage its bitmaps, or
simply to hold on to a global reference to the GL context while the
app is running (all Cocoa memory management is done by reference
counting)

Any thoughts on this one?


Problems can arise when textures are shared between contexts. One solution is to never share resources between contexts, and let each context/display manage its own. The other solution is to always share resources and only delete when the last one goes down. The third solution: never call glDeleteTextures anyway, as the driver *should* clean up when the context goes down. This is not 100% fullproof though as it depends on the implementation of the driver (I've seen crashes on some drivers when a context goes down while drawing a VBO).

Personally I'd go for solution #2 :)

- Stephen




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/