Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » al_draw_bitmap() wont work after al_resize_display()

This thread is locked; no one can reply to it. rss feed Print
al_draw_bitmap() wont work after al_resize_display()
Rafael Dazcal
Member #15,016
March 2013

Hi!

I have a game tool in Allegro 5 I`m working on, using Windows 7.

It works fine, but if I call 'al_resize_display()', 'al_draw_bitmap()' will stop drawing on the display...

Any idea of why that would happen?

Thanks in advance

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Could be a few reasons - maybe the texture was lost due to some setting you used, like ALLEGRO_NO_PRESERVE_TEXTURE when loading a bitmap? But you would probably know about that. It could also be that you did not reset the drawing target. I don't know if the backbuffer is auto selected on al_resize_display or not. So try calling al_set_target_bitmap(al_get_backbuffer(display)); before you draw again.

Other than that, the best idea is to show some code using <code>code goes here...</code> tags.

Oh, and tell us which version of Allegro 5 you are using.

Edit

- Sync bitmaps before resizing display to prevent changes being lost
after the resize (D3D).

This could also be the problem then. Try updating to 5.1.6 and see if it is fixed if you can't fix it any other way.

Go to: