From 3d74d1a15b8fa011c0a94de16d14120066f22fa4 Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Tue, 18 Oct 2011 15:10:31 +0800 Subject: [PATCH] --- scene.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scene.c b/scene.c index 736d5e6..93d2171 100644 --- a/scene.c +++ b/scene.c @@ -556,14 +556,14 @@ void display() { glutSolidTeapot(1); // Draw teapot for test glPushMatrix(); - glDisable(GL_LIGHTING); + //glDisable(GL_LIGHTING); glColor3f(1.0, 1.0, 1.0); /* Draw a yellow ball at the light source. */ glTranslatef(lightPosition[0], lightPosition[1], lightPosition[2]); glutSolidSphere(1.0, 5, 5); - glEnable(GL_LIGHTING); + //glEnable(GL_LIGHTING); glPopMatrix(); glPopMatrix(); @@ -595,14 +595,12 @@ void init() { 0.0, 1.0, 0.0 /* up is in postivie Y direction */ ); - glTranslatef( 0.0f, 0.0f, -600.0f); // Move into the Screen 10.0 - - /*glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1); + glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1); glLightfv(GL_LIGHT0, GL_DIFFUSE, lightColor); glLightf(GL_LIGHT0, GL_CONSTANT_ATTENUATION, 0.1); glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0.05); glEnable(GL_LIGHT0); - glEnable(GL_LIGHTING);*/ + glEnable(GL_LIGHTING); } /** -- 2.20.1