istereo

view src/glutmain.c @ 14:b39d8607f4bb

added textures
author John Tsiombikas <nuclear@mutantstargoat.com>
date Wed, 07 Sep 2011 09:03:51 +0300
parents bb68fac22579
children 70309d71c899
line source
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <GL/glew.h>
4 #include <GL/glut.h>
5 #include "sanegl.h"
6 #include "istereo.h"
7 #include "sdr.h"
9 void disp(void);
10 void keyb(unsigned char key, int x, int y);
12 int main(int argc, char **argv)
13 {
14 glutInit(&argc, argv);
15 glutInitWindowSize(640, 960);
16 glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
17 glutCreateWindow("test");
19 glutDisplayFunc(disp);
20 glutIdleFunc(glutPostRedisplay);
21 glutReshapeFunc(reshape);
22 glutKeyboardFunc(keyb);
24 glewInit();
26 if(init() == -1) {
27 return 1;
28 }
30 glutMainLoop();
31 return 0;
32 }
34 void disp(void)
35 {
36 redraw();
38 glutSwapBuffers();
39 }
41 void keyb(unsigned char key, int x, int y)
42 {
43 switch(key) {
44 case 27:
45 exit(0);
47 default:
48 break;
49 }
50 }