[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sat, Mar 8, 2008 at 10:31 AM, Milan Mimica <milan.mimica@xxxxxxxxxx> wrote:
> Look at the comments for al_is_compatible_bitmap().
That's fine, but a bit restrictive in general.
Anyway a new problem has occurred. I've tightened up the thread
safety/object lifetime of my implementation and started getting
errors! In exnew_multiwin and exnewapi, bitmaps are created for the
display, then the main loop runs until all the displays have been
closed by the user, then the bitmaps are deleted. My problem is that
closing the display closes the OpenGL context and therefore the
textures are invalid. When the bitmaps are destroyed I get an access
violation in glDeleteTextures.
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?
Pete