From 1b8067182b0a43a8cb49ed32657146fd30b0b84b Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Sun, 9 Oct 2011 14:41:51 +0800 Subject: [PATCH] --- scene.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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(); -- 2.20.1