Advertisement
tourniquet

Allegro Lesson 1

Jan 29th, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <allegro5/allegro.h>
  3.  
  4. int main(int argc, char **argv) {
  5.  
  6.     ALLEGRO_DISPLAY *display = NULL;
  7.     if(!al_init()) {
  8.         return -1;
  9.     }
  10.  
  11.     display = al_create_display(640, 640);
  12.     if(!display) {
  13.         return -1;
  14.     }
  15.  
  16.     al_clear_to_color(al_map_rgb(255, 0, 0));
  17.     al_flip_display();
  18.     al_rest(5.0);
  19.     al_destroy_display(display);
  20.  
  21.     return 0;
  22. }
  23.  
  24. /* http://youtu.be/MSDPjrI_4B8 */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement