# HG changeset patch # User John Tsiombikas # Date 1414537773 -7200 # Node ID 0888d4e24e213c276a430229d1d832ad28f0d275 # Parent 62a37bd5bc7477e6a9d131059b7afbd9f68c3471# Parent 8a80bb1535825295a57d200998cef6cf3b258c3d merged diff -r 62a37bd5bc74 -r 0888d4e24e21 src/main.c --- a/src/main.c Wed Oct 29 01:08:38 2014 +0200 +++ b/src/main.c Wed Oct 29 01:09:33 2014 +0200 @@ -11,8 +11,6 @@ #include #include #include -#include -#include #ifdef WIN32 #define OVR_OS_WIN32 @@ -20,6 +18,8 @@ #define OVR_OS_MAC #else #define OVR_OS_LINUX +#include +#include #endif #include @@ -380,11 +380,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) { @@ -433,6 +441,7 @@ glEnd(); glFrontFace(GL_CCW); + glPopMatrix(); } /* update_rtarg creates (and/or resizes) the render target used to draw the two stero views */