(no commit message)
authorAsh Tyndall <[email protected]>
Sun, 9 Oct 2011 06:41:51 +0000 (14:41 +0800)
committerAsh Tyndall <[email protected]>
Sun, 9 Oct 2011 06:41:51 +0000 (14:41 +0800)
scene.c

diff --git a/scene.c b/scene.c
index 49782af..3a948c8 100644 (file)
--- 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);\r
 \r
   glMatrixMode(GL_MODELVIEW);                     // Select The Modelview Matrix\r
-  glLoadIdentity();                           // Reset The Modelview Matrix\r
+   glLoadIdentity();                           // Reset The Modelview Matrix\r
 }\r
 \r
 /**\r
@@ -530,10 +530,18 @@ int main(int argc, char **argv) {
     glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);\r
     glutInitWindowSize(500, 500);\r
     glutCreateWindow("Scene Editor");\r
+\r
+    glShadeModel(GL_SMOOTH);                        // Enables Smooth Shading\r
+    glClearColor(0.0f, 0.0f, 0.0f, 0.0f);                   // Black Background\r
+    glClearDepth(1.0f);                         // Depth Buffer Setup\r
+    glEnable(GL_DEPTH_TEST);                        // Enables Depth Testing\r
+    glDepthFunc(GL_LEQUAL);                         // The Type Of Depth Test To Do\r
+\r
+    glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);          // Really Nice Perspective Calculations\r
+\r
     glutReshapeFunc(windowReshape);\r
     glutDisplayFunc(display);\r
     glutMouseFunc(mouse);\r
-    glEnable(GL_DEPTH_TEST); // Enable hidden surface removal\r
 \r
     makeMenu();\r
     glutMainLoop();\r

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