vrchess
diff src/game.cc @ 12:778ed91cb7fd
fullscreen to rift now works in extended mode with freeglut
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 23 Aug 2014 12:03:29 +0300 |
parents | 5dc4e2b8f6f5 |
children |
line diff
1.1 --- a/src/game.cc Sat Aug 23 00:24:20 2014 +0300 1.2 +++ b/src/game.cc Sat Aug 23 12:03:29 2014 +0300 1.3 @@ -22,11 +22,13 @@ 1.4 bool game_init() 1.5 { 1.6 vr_init(); 1.7 + //vr_use_module_named("null"); 1.8 1.9 glEnable(GL_DEPTH_TEST); 1.10 glEnable(GL_CULL_FACE); 1.11 glEnable(GL_LIGHTING); 1.12 glEnable(GL_LIGHT0); 1.13 + glEnable(GL_NORMALIZE); 1.14 1.15 glClearColor(0.1, 0.1, 0.1, 1); 1.16 1.17 @@ -239,14 +241,33 @@ 1.18 glLoadIdentity(); 1.19 1.20 glMatrixMode(GL_MODELVIEW); 1.21 - glPushMatrix(); 1.22 - glTranslatef(0, 0.75, 0); 1.23 1.24 - glFrontFace(GL_CW); 1.25 - glutSolidTeapot(1.0); 1.26 - glFrontFace(GL_CCW); 1.27 + for(int i=0; i<4; i++) { 1.28 + glPushMatrix(); 1.29 + glTranslatef(i & 1 ? -10 : 10, 0, i & 2 ? -10 : 10); 1.30 + glScalef(2.0, 2.0, 2.0); 1.31 1.32 - glPopMatrix(); 1.33 + glBegin(GL_TRIANGLES); 1.34 + glNormal3f(0, 1, 1); 1.35 + glVertex3f(-1, 0, 1); 1.36 + glVertex3f(1, 0, 1); 1.37 + glVertex3f(0, 1.2, 0); 1.38 + glNormal3f(1, 1, 0); 1.39 + glVertex3f(1, 0, 1); 1.40 + glVertex3f(1, 0, -1); 1.41 + glVertex3f(0, 1.2, 0); 1.42 + glNormal3f(0, 1, -1); 1.43 + glVertex3f(1, 0, -1); 1.44 + glVertex3f(-1, 0, -1); 1.45 + glVertex3f(0, 1.2, 0); 1.46 + glNormal3f(-1, 1, 0); 1.47 + glVertex3f(-1, 0, -1); 1.48 + glVertex3f(-1, 0, 1); 1.49 + glVertex3f(0, 1.2, 0); 1.50 + glEnd(); 1.51 + 1.52 + glPopMatrix(); 1.53 + } 1.54 } 1.55 1.56 static bool setup_rtarg(int x, int y)