From: Ash Tyndall Date: Sun, 9 Oct 2011 06:41:51 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=commitdiff_plain;h=1b8067182b0a43a8cb49ed32657146fd30b0b84b --- diff --git a/scene.c b/scene.c index 49782af..3a948c8 100644 --- a/scene.c +++ b/scene.c @@ -472,7 +472,7 @@ void windowReshape(int w, int h) { gluPerspective(45.0f,(GLfloat)w/(GLfloat)h,0.1f,100.0f); glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix - glLoadIdentity(); // Reset The Modelview Matrix + glLoadIdentity(); // Reset The Modelview Matrix } /** @@ -530,10 +530,18 @@ int main(int argc, char **argv) { glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); glutInitWindowSize(500, 500); glutCreateWindow("Scene Editor"); + + glShadeModel(GL_SMOOTH); // Enables Smooth Shading + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // Black Background + glClearDepth(1.0f); // Depth Buffer Setup + glEnable(GL_DEPTH_TEST); // Enables Depth Testing + glDepthFunc(GL_LEQUAL); // The Type Of Depth Test To Do + + glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations + glutReshapeFunc(windowReshape); glutDisplayFunc(display); glutMouseFunc(mouse); - glEnable(GL_DEPTH_TEST); // Enable hidden surface removal makeMenu(); glutMainLoop();