The code below won't work; it produces a blank screen. But if I change the filled rectangle line toward the bottom line to:
al_draw_filled_rectangle(100, 100, 100+15, 100+15, al_map_rgb(155, 255, 155));
It produces a square at the correct coordinates. What's up?
#define ALLEGRO_STATICLINK
#include <allegro5/allegro.h>
#include <allegro5/allegro_primitives.h>
int main(int argc, char **argv)
{
ALLEGRO_DISPLAY *display;
if(!al_init())
{
return -1;
}
display = al_create_display(640, 480);
if(!display)
{
return -1;
}
if(!al_init_primitives_addon())
{
return -1;
}
al_draw_filled_rectangle(73, 493, 73+15, 493+15, al_map_rgb(155, 255, 155));
al_flip_display();
al_rest(10);
return 0;
}