X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=bc6e5950ff3186d57797b1b6b10e48c3a2353dae;hb=3bcec71f2022f3a299b594cb6f16e74c052497bb;hp=84892823545bf75017da008d186e4cd1580d5433;hpb=92fbf793e39627632747a84aeaf9653e13fdb8e3;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index 8489282..bc6e595 100644 --- a/scene.c +++ b/scene.c @@ -318,7 +318,7 @@ void display() { 75.0, aspect, 0.1, - 200 + 300 ); glMatrixMode(GL_MODELVIEW); @@ -355,8 +355,6 @@ void display() { glLightfv(GL_LIGHT1, GL_POSITION, lightPosition1); drawFloor(); - - drawLine(); // Draw teapot for a test object glPushMatrix(); @@ -370,21 +368,23 @@ void display() { // Draw a white ball over the light source glPushMatrix(); glDisable(GL_LIGHTING); - glColor3f(0.0, 0.0, 0.0); + glColor3f(1.0, 1.0, 1.0); glTranslatef(lightPosition0[0], lightPosition0[1], lightPosition0[2]); - glutSolidSphere(0.3, 50, 50); + glutSolidSphere(0.5, 50, 50); glEnable(GL_LIGHTING); glPopMatrix(); // Draw a white ball over the light source glPushMatrix(); glDisable(GL_LIGHTING); - glColor3f(0.0, 0.0, 0.0); + glColor3f(1.0, 1.0, 1.0); glTranslatef(lightPosition1[0], lightPosition1[1], lightPosition1[2]); - glutSolidSphere(0.3, 50, 50); + glutSolidSphere(0.5, 50, 50); glEnable(GL_LIGHTING); glPopMatrix(); + drawAxisLines(); + glPopMatrix(); glutSwapBuffers(); @@ -416,8 +416,8 @@ void init() { glMaterialfv(GL_FRONT, GL_EMISSION, emission); glMaterialf(GL_FRONT, GL_SHININESS, shine); - glEnable(GL_LIGHT0); - glEnable(GL_LIGHT1); + //glEnable(GL_LIGHT0); + //glEnable(GL_LIGHT1); glEnable(GL_LIGHTING); } @@ -453,7 +453,7 @@ int main(int argc, char **argv) { glEnable(GL_DEPTH_TEST); // Enables Depth Testing glDepthFunc(GL_LEQUAL); // the type glEnable(GL_TEXTURE_2D); - glEnable(GL_CULL_FACE); + //glEnable(GL_CULL_FACE); glEnable(GL_NORMALIZE); glLineWidth(2.0);