I'm currently doing a little university project in C, using allegro5. Part of it is just drawing a person on additional window that comes up and I'm trying to change the background colour of the window. I use
GFX_SetBackgroundColour(LIGHTBLUE)
as it's the instruction we've got from the classes and the one I keep finding on the allegro websites. Except, the background stays black. I'm not sure how to proceed from that.
Also, I'm having some bad luck trying to type some text onto the window that comes up. But it might be just me not being sure how to use GFX_DrawText(int x, int y, const char text)
, what exactly to put as the last variable.
You can set the background color in allegro5 is
al_clear_to_color
.
For example, you could set a red background with:
al_clear_to_color(al_map_rgb(255, 0, 0));
Typically you would call this at the beginning of the draw loop every frame.