Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // gcc -Wall 3.c -o 3 $(pkg-config --libs allegro-5.0 allegro_image-5.0 allegro_primitives-5.0)
- #include <allegro5/allegro.h>
- #include <allegro5/allegro_primitives.h>
- int main(int argc, char **argv) {
- if(!al_init()) {
- return -1;
- }
- ALLEGRO_DISPLAY *display;
- display = al_create_display(400, 400);
- if(!display) {
- return -1;
- }
- al_init_primitives_addon();
- al_clear_to_color(al_map_rgb(0, 0, 0));
- al_draw_rectangle(10, 10, 200, 150, al_map_rgb(255, 0, 0), 0);
- al_flip_display();
- al_rest(60.0);
- al_destroy_display(display);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement