vrheights

annotate src/game.cc @ 0:ccbd444939a1

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 22 Sep 2014 18:36:24 +0300
parents
children d06e4e24f922
rev   line source
nuclear@0 1 #include <stdio.h>
nuclear@0 2 #include "opengl.h"
nuclear@0 3 #include "game.h"
nuclear@0 4 #include "goatvr.h"
nuclear@0 5
nuclear@0 6 bool game_init()
nuclear@0 7 {
nuclear@0 8 init_opengl();
nuclear@0 9
nuclear@0 10 if(vr_init() == -1) {
nuclear@0 11 return false;
nuclear@0 12 }
nuclear@0 13
nuclear@0 14 glEnable(GL_DEPTH_TEST);
nuclear@0 15 glEnable(GL_CULL_FACE);
nuclear@0 16 }
nuclear@0 17
nuclear@0 18 void game_cleanup()
nuclear@0 19 {
nuclear@0 20 vr_shutdown();
nuclear@0 21 }
nuclear@0 22
nuclear@0 23 void game_update(long tm);
nuclear@0 24 void game_display();
nuclear@0 25 void game_reshape(int x, int y);
nuclear@0 26 void game_keyboard(int key, bool pressed);
nuclear@0 27 void game_mouse_button(int bn, bool state, int x, int y);
nuclear@0 28 void game_mouse_motion(int x, int y);
nuclear@0 29