From 26eaecb0bfa49b4cd19dd22e519d02ce08de755c Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sun, 23 Aug 2009 11:28:19 +0100 Subject: [PATCH] Put lighting back to how it was --- .gitignore | 3 ++- src/Light.cpp | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 017e011..94dde86 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ gmon.out TAGS CPackConfig.cmake CPackSourceConfig.cmake -install_manifest.txt \ No newline at end of file +install_manifest.txt +GG/ diff --git a/src/Light.cpp b/src/Light.cpp index c70d11b..d4af67b 100644 --- a/src/Light.cpp +++ b/src/Light.cpp @@ -24,13 +24,17 @@ struct SunLight : ILight { void apply() const { - const GLfloat globalAmbient[] = { 0.3f, 0.3f, 0.3f, 1.0f }; + //const GLfloat globalAmbient[] = { 0.3f, 0.3f, 0.3f, 1.0f }; + const GLfloat globalAmbient[] = { 0.25f, 0.25f, 0.25f, 1.0f }; glLightModelfv(GL_LIGHT_MODEL_AMBIENT, globalAmbient); const GLfloat ambient[] = { 0.0f, 0.0f, 0.0f, 1.0f }; - const GLfloat diffuse[] = { 0.4f, 0.4f, 0.4f, 1.0f }; - const GLfloat specular[] = { 0.4f, 0.4f, 0.4f, 1.0f }; - const GLfloat position[] = { 1.0f, 2.0f, 1.0f, + //const GLfloat diffuse[] = { 0.4f, 0.4f, 0.4f, 1.0f }; + const GLfloat diffuse[] = { 0.5f, 0.5f, 0.5f, 1.0f }; + //const GLfloat specular[] = { 0.4f, 0.4f, 0.4f, 1.0f }; + const GLfloat specular[] = { 0.5f, 0.5f, 0.5f, 1.0f }; + //const GLfloat position[] = { 1.0f, 2.0f, 1.0f, }; + const GLfloat position[] = { 1.0f, 5.0f, 0.0f, 0.0f }; // => non-directional glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); -- 2.39.2