summaryrefslogtreecommitdiffstats
path: root/matchblox/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'matchblox/main.cpp')
-rw-r--r--matchblox/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/matchblox/main.cpp b/matchblox/main.cpp
index 409a3ea..a7cbedb 100644
--- a/matchblox/main.cpp
+++ b/matchblox/main.cpp
@@ -27,14 +27,17 @@ C_MatchBloxEngine *g_pEngine;
void init_gl(void)
{
GLfloat l_fLightpos[4] = {0.0, 1.0, 1.0, 0.0};
- glClearColor(0.9, 0.9, 0.9, 1.0);
+ GLfloat l_pfMaterial[] = {1.0f, 0.4f, 0.0f, 0.0f};
+ glClearColor(1, 0.4, 0.2, 1.0);
glClearDepth(1000.0);
glShadeModel(GL_SMOOTH);
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, l_pfMaterial);
glLightfv(GL_LIGHT0, GL_POSITION, l_fLightpos);
glEnable(GL_NORMALIZE);
+ glDisable(GL_TEXTURE_2D);
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
} // init_gl
@@ -52,8 +55,12 @@ void render_scene(void)
g_pEngine->Render(glutGet(GLUT_ELAPSED_TIME));
+ glDisable(GL_LIGHTING);
+
MenuRender();
+ glEnable(GL_LIGHTING);
+
glutSwapBuffers();
} // render_scene