[a5] Starting from scratch with a bitmap:Cant draw to target. Need to set flags?

So I have been starting at my code too long, and I can't recall what needs to be done to be able to draw and then render a bitmap.

If declare the bitmap, and try

1ALLEGRO_BITMAP *HUDLayer; 2 3... 4 5al_set_target_bitmap(HUDLayer); 6al_draw_filled_rectangle(0,0,1920,1080,al_map_rgb(0,150,255)); 7al_set_target_backbuffer(Display); 8 9... 10 11al_draw_bitmap(HUDLayer,0,0,0); 12al_flip_display();

This causes a crash.

However, if I al_load_bitmap() or al_clone_bitmap() to the bitmap, and then proceed with the above code it works just fine. What am I forgetting? (Needed Flags?)

Thanks in advance!




Thanks again!

Thread #611991. Printed from Allegro.cc