From 435c394a08f20523e1c665743cc0b9d42e524f53 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 5 Mar 2008 18:53:33 +0000 Subject: directional light --- src/client/view.cc | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3