nuclear@1: #include nuclear@1: #include nuclear@1: #include nuclear@1: #include nuclear@1: #include "sanegl.h" nuclear@2: #include "istereo.h" nuclear@2: #include "sdr.h" nuclear@1: nuclear@1: void disp(void); nuclear@1: void keyb(unsigned char key, int x, int y); nuclear@1: nuclear@1: int main(int argc, char **argv) nuclear@1: { nuclear@1: glutInit(&argc, argv); nuclear@24: glutInitWindowSize(960, 640); nuclear@1: glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); nuclear@1: glutCreateWindow("test"); nuclear@1: nuclear@1: glutDisplayFunc(disp); nuclear@1: glutIdleFunc(glutPostRedisplay); nuclear@1: glutReshapeFunc(reshape); nuclear@1: glutKeyboardFunc(keyb); nuclear@1: nuclear@2: glewInit(); nuclear@2: nuclear@2: if(init() == -1) { nuclear@2: return 1; nuclear@2: } nuclear@2: nuclear@1: glutMainLoop(); nuclear@1: return 0; nuclear@1: } nuclear@1: nuclear@1: void disp(void) nuclear@1: { nuclear@2: redraw(); nuclear@1: nuclear@1: glutSwapBuffers(); nuclear@1: } nuclear@1: nuclear@24: extern int stereo; nuclear@24: nuclear@1: void keyb(unsigned char key, int x, int y) nuclear@1: { nuclear@1: switch(key) { nuclear@1: case 27: nuclear@1: exit(0); nuclear@1: nuclear@24: case 's': nuclear@24: stereo = !stereo; nuclear@24: break; nuclear@24: nuclear@24: case '`': nuclear@24: { nuclear@24: int xsz = glutGet(GLUT_WINDOW_WIDTH); nuclear@24: int ysz = glutGet(GLUT_WINDOW_HEIGHT); nuclear@24: nuclear@24: glutReshapeWindow(ysz, xsz); nuclear@24: } nuclear@24: break; nuclear@24: nuclear@1: default: nuclear@1: break; nuclear@1: } nuclear@1: }