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);
26 active_screen->start();
37 active_screen->draw();
39 assert(glGetError() == GL_NO_ERROR);
42 void game_reshape(int x, int y)
44 active_screen->reshape(x, y);
47 void game_keyboard(int key, bool pressed)
52 /* for some inexplicable reason freeglut seems to produce key
53 * 17 for ctrl-q on both X and windows.
63 active_screen->keyboard(key, pressed);
66 void game_mbutton(int bn, bool pressed, int x, int y)
68 active_screen->mbutton(bn, pressed, x, y);
71 void game_mmotion(int x, int y)
73 active_screen->mmotion(x, y);
76 void game_mwheel(int dir, int x, int y)
78 active_screen->mwheel(dir, x, y);