diff options
author | Stijn Buys <ingar@osirion.org> | 2008-03-05 18:53:33 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-03-05 18:53:33 +0000 |
commit | 435c394a08f20523e1c665743cc0b9d42e524f53 (patch) | |
tree | eac660e88e519b94d191a4e5e8c85d59a735181b | |
parent | 4f6b27b58bfae9ce860a005edf890d8f1136a85f (diff) |
directional light
-rw-r--r-- | src/client/view.cc | 4 |
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); |