diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2008-05-14 13:46:52 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2008-05-14 13:46:52 (GMT) |
commit | 2455e17dcb148c0004347f6ab85758184eb47ba6 (patch) | |
tree | 27c4aaef8c3db95ad8b8bd6ec67403edd4dde294 /matchblox/main.cpp | |
parent | 338ea2bc749adf8a5183804acec0f37ee4d69222 (diff) | |
download | 2iv55-2455e17dcb148c0004347f6ab85758184eb47ba6.zip 2iv55-2455e17dcb148c0004347f6ab85758184eb47ba6.tar.gz 2iv55-2455e17dcb148c0004347f6ab85758184eb47ba6.tar.bz2 |
menu ovverlays application. first integration sstep complete. TODO: Fix engine material/opengl init
Diffstat (limited to 'matchblox/main.cpp')
-rw-r--r-- | matchblox/main.cpp | 9 |
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
|