From: Ash Tyndall Date: Fri, 21 Oct 2011 02:30:26 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=5b954dfe6532f13411b454949cf1387b13b6dc52;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index aa27999..bb80b65 100644 --- a/scene.c +++ b/scene.c @@ -340,7 +340,9 @@ void display() { glPushMatrix(); glTranslatef(0.0, 0.5, 0.0); // **NOTE: Teapot currently does not rest on surface glColor3f(0.0, 0.0, 0.0); - glutSolidTeapot(1); + glFrontFace(GL_CW); + glutSolidTeapot(1); + glFrontFace(GL_CCW); glPopMatrix(); // Draw a white ball over the light source @@ -371,11 +373,11 @@ void init() { glLightModelfv(GL_LIGHT_MODEL_AMBIENT, glightmodel); - glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, ambient); - glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diffuse); - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular); - glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, emission0); - glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, shine); + glMaterialfv(GL_FRONT, GL_AMBIENT, ambient); + glMaterialfv(GL_FRONT, GL_DIFFUSE, diffuse); + glMaterialfv(GL_FRONT, GL_SPECULAR, specular); + glMaterialfv(GL_FRONT, GL_EMISSION, emission0); + glMaterialf(GL_FRONT, GL_SHININESS, shine); glEnable(GL_LIGHT0); glEnable(GL_LIGHTING);