I have just compiled binaries for 5.1.1 and tried it on my project. I noticed that now when I close the window, it takes about 2 seconds for it to close. I reverted back to 5.1.0 to see if it would close like normal and it did. If I use D3D this does not happen, only with OpenGL.
There is nothing special in my close code.
Is there something new added that I need to consider?
Thanks
Destroy your bitmaps before the display?
I'll try that when I get home. I'm sure that is it. Thanks.
Though, why did it not do this before 5.1.1?
5.1.1 has some new bitmap conversion semantics. It's possible that the new rules leave it so it won't auto download textures on exit (which makes sense, its silly to download them all if all you're doing is exiting).
I checked the order and it seems correct:
If I remove the call to al_destroy_display the speed is normal. But if I deinit Allegro before destroying the display it crashes so that does not work.
Walk through a debugger and see if there's any particular call that takes two seconds.
It spent 1.37s doing al_clone_bitmap.
static void destroy_display_internals(ALLEGRO_DISPLAY_WGL *wgl_disp) void _al_convert_to_memory_bitmap(ALLEGRO_BITMAP *bitmap) void al_convert_bitmap(ALLEGRO_BITMAP *bitmap) ALLEGRO_BITMAP *al_clone_bitmap(ALLEGRO_BITMAP *bitmap)
Which is strange because my #of calls to al_destroy_bitmap == #calls to al_load_bitmap.
Check your al_create_bitmap calls, etc, along with your fonts.
Maybe even update al_clone_bitmap() to log some info about the size of the bitmap, etc to help give a hint. (Or check the values in the debugger, if possible.)
Turns out I had not declared my Agui Image destructor virtual. Thanks for the help!
The fact that its calling _al_convert_to_memory_bitmap tells me that you weren't actually destroying the bitmaps before the display. It's something to look out for.
Turns out I had not declared my Agui Image destructor virtual. Thanks for the help!
And that tells me I'm correct!
The bitmap conversion changes were in the 5.1.0 release.
Oh well then. Shows what I know
The bitmap conversion changes were in the 5.1.0 release.
The code wasn't tweaked at all in 5.1.1 over 5.1.0?