From edbb1587415fdc933fb7e66430376e242b881a38 Mon Sep 17 00:00:00 2001 From: Oliver Bock Date: Fri, 6 Aug 2010 14:01:45 +0200 Subject: [PATCH] Fixed light position for proper pulsar illumination --- src/pulsaranimationwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pulsaranimationwidget.cpp b/src/pulsaranimationwidget.cpp index a748368..f1c1648 100644 --- a/src/pulsaranimationwidget.cpp +++ b/src/pulsaranimationwidget.cpp @@ -134,8 +134,8 @@ void PulsarAnimationWidget::initializeGL() GLfloat LightAmbient[] = {0.3, 0.3, 0.3, 1.0}; GLfloat LightDiffuse[] = {1.0, 1.0, 1.0, 1.0}; GLfloat LightSpecular[] = {1.0, 1.0, 1.0, 1.0}; - GLfloat LightPosition[] = {0.0, 0.0, 0.0, 1.0}; - GLfloat spot_direction[] = {0.0, 0.0, 0.0}; + GLfloat LightPosition[] = {0.0, 0.0, 3.0, 1.0}; + GLfloat spot_direction[] = {0.0, 0.0, -1.0}; glLightfv(GL_LIGHT0, GL_AMBIENT, LightAmbient); glLightfv(GL_LIGHT0, GL_DIFFUSE, LightDiffuse); -- GitLab