al_draw_bitmap() wont work after al_resize_display()
Rafael Dazcal

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

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.

Thread #612275. Printed from Allegro.cc