From 168b99f77c5c0defa67c22beb64f44dbe03c7b22 Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Wed, 19 Oct 2011 20:21:19 +0800 Subject: [PATCH] --- scene.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scene.c b/scene.c index 9fc30e7..d6b3e8f 100644 --- a/scene.c +++ b/scene.c @@ -611,6 +611,7 @@ void drawFloor() { * Draw x, z axis on floor */ void drawLine() { + // **NOTE: fix function glDisable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -636,6 +637,12 @@ void display() { 0.0, 0.0, 0.0, /* center is at (x,y,z) */ 0.0, 1.0, 0.0 /* up is in postivie Y direction */ ); + glEnable(GL_LIGHT0); + glLightfv(GL_LIGHT0, GL_POSITION, light0_pos); + glLightfv(GL_LIGHT0, GL_AMBIENT, ambient0); + glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse0); + glLightfv(GL_LIGHT0, GL_SPECULAR, specular0); + glEnable(GL_LIGHTING); // **NOTE: Currently this rotation function is all that moves the camera off // the flat surface. Need to integrate function into gluLookAt -- 2.20.1