oculus2

changeset 12:92acd335620e

added alignment box cross
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 28 Oct 2014 06:57:06 +0200
parents 5b04743fd3d0
children 4c08bc24ef0a
files src/main.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/src/main.c	Mon Sep 15 03:00:50 2014 +0300
     1.2 +++ b/src/main.c	Tue Oct 28 06:57:06 2014 +0200
     1.3 @@ -339,11 +339,19 @@
     1.4  		draw_box(0.5, 0.5, 0.5, 1.0);
     1.5  		glPopMatrix();
     1.6  	}
     1.7 +
     1.8 +	col[0] = 1;
     1.9 +	col[1] = 1;
    1.10 +	col[2] = 0.4;
    1.11 +	glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, col);
    1.12 +	draw_box(0.05, 1.2, 6, 1.0);
    1.13 +	draw_box(6, 1.2, 0.05, 1.0);
    1.14  }
    1.15  
    1.16  void draw_box(float xsz, float ysz, float zsz, float norm_sign)
    1.17  {
    1.18  	glMatrixMode(GL_MODELVIEW);
    1.19 +	glPushMatrix();
    1.20  	glScalef(xsz * 0.5, ysz * 0.5, zsz * 0.5);
    1.21  
    1.22  	if(norm_sign < 0.0) {
    1.23 @@ -392,6 +400,7 @@
    1.24  	glEnd();
    1.25  
    1.26  	glFrontFace(GL_CCW);
    1.27 +	glPopMatrix();
    1.28  }
    1.29  
    1.30  /* update_rtarg creates (and/or resizes) the render target used to draw the two stero views */