# HG changeset patch # User John Tsiombikas # Date 1414472226 -7200 # Node ID 92acd335620ea50197c34729cea5d8293a512267 # Parent 5b04743fd3d0da414bfdeeac4a222314acbd2a32 added alignment box cross diff -r 5b04743fd3d0 -r 92acd335620e src/main.c --- a/src/main.c Mon Sep 15 03:00:50 2014 +0300 +++ b/src/main.c Tue Oct 28 06:57:06 2014 +0200 @@ -339,11 +339,19 @@ draw_box(0.5, 0.5, 0.5, 1.0); glPopMatrix(); } + + col[0] = 1; + col[1] = 1; + col[2] = 0.4; + glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, col); + draw_box(0.05, 1.2, 6, 1.0); + draw_box(6, 1.2, 0.05, 1.0); } void draw_box(float xsz, float ysz, float zsz, float norm_sign) { glMatrixMode(GL_MODELVIEW); + glPushMatrix(); glScalef(xsz * 0.5, ysz * 0.5, zsz * 0.5); if(norm_sign < 0.0) { @@ -392,6 +400,7 @@ glEnd(); glFrontFace(GL_CCW); + glPopMatrix(); } /* update_rtarg creates (and/or resizes) the render target used to draw the two stero views */