Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-03-05 18:53:33 +0000
committerStijn Buys <ingar@osirion.org>2008-03-05 18:53:33 +0000
commit435c394a08f20523e1c665743cc0b9d42e524f53 (patch)
treeeac660e88e519b94d191a4e5e8c85d59a735181b
parent4f6b27b58bfae9ce860a005edf890d8f1136a85f (diff)
directional light
-rw-r--r--src/client/view.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/view.cc b/src/client/view.cc
index 1863d00..cd90efc 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -61,6 +61,10 @@ void reset()
glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse_light);
glLightfv(GL_LIGHT0, GL_SPECULAR, specular_light);
+ // position GL_LIGHT0 at the camera eye
+ GLfloat light_position[] = { 0.0, 0.0, 0.0, 1.0 };
+ glLightfv(GL_LIGHT0, GL_POSITION, light_position);
+
// color tracking
glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);