glEnable(GL_FRAMEBUFFER_SRGB);
glEnable(GL_DEPTH_TEST);
glEnable(GL_CULL_FACE);
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
active_screen->start();
return true;
void game_reshape(int x, int y)
{
- active_screen->draw();
+ active_screen->reshape(x, y);
}
void game_keyboard(int key, bool pressed)
{
if(pressed) {
switch(key) {
- case 'q':
- case 'Q':
- if(game_modkeys() & MODKEY_CTRL) {
- game_quit();
- return;
- }
- break;
+ case 17:
+ /* for some inexplicable reason freeglut seems to produce key
+ * 17 for ctrl-q on both X and windows.
+ */
+ game_quit();
+ return;
default:
break;