-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathmain.cpp
More file actions
34 lines (26 loc) · 658 Bytes
/
Copy pathmain.cpp
File metadata and controls
34 lines (26 loc) · 658 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <iostream>
#include "csdl2.h"
#include "cgl.h"
using namespace std;
const int SCREEN_WIDTH = 800;
const int SCREEN_HEIGHT =600;
SDL_Window *mainwindow; /* Our window handle */
/* Our program's entry point */
int main(int argc, char *argv[])
{
CGL *gl = new CGL(SCREEN_WIDTH, SCREEN_HEIGHT, mainwindow);
CSDL2 *sdl = new CSDL2(SCREEN_WIDTH, SCREEN_HEIGHT, gl);
gl->initGL();
gl->compileShader();
//gl->loadTexture();
gl->setUniform();
while(true)
{
/* Process incoming events. */
sdl->handleEvents(gl);
/*Render scene*/
gl->renderGL();
}
gl->clean();
return 0;
}