6 int win_width, win_height;
13 if(init_opengl() == -1) {
21 glEnable(GL_MULTISAMPLE);
22 glEnable(GL_FRAMEBUFFER_SRGB);
23 glEnable(GL_DEPTH_TEST);
24 glEnable(GL_CULL_FACE);
25 glEnable(GL_LIGHTING);
28 active_screen->start();
39 active_screen->draw();
41 assert(glGetError() == GL_NO_ERROR);
44 void game_reshape(int x, int y)
46 active_screen->draw();
49 void game_keyboard(int key, bool pressed)
54 /* for some inexplicable reason freeglut seems to produce key
55 * 17 for ctrl-q on both X and windows.
65 active_screen->keyboard(key, pressed);
68 void game_mbutton(int bn, bool pressed, int x, int y)
70 active_screen->mbutton(bn, pressed, x, y);
73 void game_mmotion(int x, int y)
75 active_screen->mmotion(x, y);
78 void game_mwheel(int dir, int x, int y)
80 active_screen->mwheel(dir, x, y);