opengl

OpenGL - SDL
Log | Files | Refs

main.c (589B)


      1 #include "window.h"
      2 #include "triangle.h"
      3 #include "objload.h"
      4 #include <stdio.h>
      5 #include <stdbool.h>
      6 #include <GL/glew.h>
      7 #include <GLFW/glfw3.h>
      8 #define SDL_DISABLE_IMMINTRIN_H
      9 #include <SDL2/SDL.h>
     10 
     11 // #ifdef __TINYC__
     12 //     #undef main
     13 // #endif
     14 //
     15 
     16 SDL_Event event;
     17 
     18 int main()
     19 {
     20     bool quit = false;
     21 
     22     create_window();
     23     triangle();
     24 
     25     while (!quit) {
     26         while(SDL_PollEvent(&event)) {
     27             if(event.type == SDL_QUIT)
     28                 quit = true;
     29         }
     30         color_window();
     31         draw_triangle();
     32         draw();
     33     }
     34     cleanup();
     35 
     36     return 0;
     37 }