Hello, i have a little problem here, i have display running on some predefined WIDTH and HEIGHT .. when i try to switch to fullscreen from windowed and using al_get_display_mode, al_set_new_display_flags(ALLEGRO_FULLSCREEN) and then al_destroy_display and al_create_display with new screen resolution from `al_get_display_mod`e .. my screen really lags .. changing back to windowed (again on the fly) didn't help.
I ve tried add counter before redrawing routine where is if(al_is_event_queue_empty(event_queue)) .. and counter is about 120 when it jumps in with normal screen but after resolution change it is about 600
Thanks for all advices
I wonder if this is related to the behavior I've had with multiple displays. When switching focus from one to the other it takes more than a second before events come through to my program. Might not be related at all though.
Hm, maybe i use two monitors but dont work with it in allegro .. i will try to disconnect it
EDIT: still same lags :/ 
EDIT 2: tried to delete event queue and register a new one, still lagging :/
EDIT 3: Fraps: before resize 60FPS, after 11FPS .. CPU: before 2% after 25%
It might lag because you lose your video bitmaps and they become memory bitmaps?
It might lag because you lose your video bitmaps and they become memory bitmaps?
Very likely, this. Try reloading your bitmaps, see if that helps.
Hmm that is highly possible .. i will definetly try it, but reloading mean only reloading or iniciating all bitmaps to null and then reload ?
I think you'd want to free the memory they used first, then reload them.
Thank all of you. It's working now, it really was memory problem. Freeing memory and reloading bitmaps works
THX a lot !
Isn't there a way to do it without loading again from the disk?(which is probably the biggest bottleneck without an SSD) I mean, if there's both a memory and video bitmap copy, shouldn't it be possible to use al_clone_bitmap or something like that to recreate the video bitmap from the memory bitmap and send it to the GPU again with the new display?
Allegro 5.1 handles this automatically. Or you can use al_convert_bitmap() manually.
al_clone_bitmap works on 5.0.x, but memory is wasted somewhere when you use it that way.
al_clone_bitmap works on 5.0.x, but memory is wasted somewhere when you use it that way.
How much? I can't really imagine what it'd be unless you're forgetting to delete the old bitmap.
I don't have a number for an individual bitmap, sorry. Memory use went up about 5 MB each time I cloned my 30 or so bitmaps. To try to reduce memory fragmentation, I tried cloning all bitmaps first, then destroying all in one go. But it didn't seem to matter.
If you have a test case, or ever try it again, please report it