(no commit message)
authorAsh Tyndall <[email protected]>
Fri, 21 Oct 2011 02:30:26 +0000 (10:30 +0800)
committerAsh Tyndall <[email protected]>
Fri, 21 Oct 2011 02:30:26 +0000 (10:30 +0800)
scene.c

diff --git a/scene.c b/scene.c
index aa27999..bb80b65 100644 (file)
--- a/scene.c
+++ b/scene.c
@@ -340,7 +340,9 @@ void display() {
     glPushMatrix();\r
       glTranslatef(0.0, 0.5, 0.0); // **NOTE: Teapot currently does not rest on surface\r
       glColor3f(0.0, 0.0, 0.0);\r
-      glutSolidTeapot(1);\r
+      glFrontFace(GL_CW);\r
+        glutSolidTeapot(1);\r
+      glFrontFace(GL_CCW);\r
     glPopMatrix();\r
 \r
     // Draw a white ball over the light source\r
@@ -371,11 +373,11 @@ void init() {
 \r
   glLightModelfv(GL_LIGHT_MODEL_AMBIENT, glightmodel);\r
 \r
-  glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, ambient);\r
-  glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diffuse);\r
-  glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular);\r
-  glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, emission0);\r
-  glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, shine);\r
+  glMaterialfv(GL_FRONT, GL_AMBIENT, ambient);\r
+  glMaterialfv(GL_FRONT, GL_DIFFUSE, diffuse);\r
+  glMaterialfv(GL_FRONT, GL_SPECULAR, specular);\r
+  glMaterialfv(GL_FRONT, GL_EMISSION, emission0);\r
+  glMaterialf(GL_FRONT, GL_SHININESS, shine);\r
 \r
   glEnable(GL_LIGHT0);\r
   glEnable(GL_LIGHTING);\r

UCC git Repository :: git.ucc.asn.au