git.ucc.asn.au
/
atyndall
/
cits2231.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1e95989
)
(no commit message)
author
Ash Tyndall
<
[email protected]
>
Sun, 9 Oct 2011 06:41:51 +0000
(14:41 +0800)
committer
Ash Tyndall
<
[email protected]
>
Sun, 9 Oct 2011 06:41:51 +0000
(14:41 +0800)
scene.c
patch
|
blob
|
history
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
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
}
\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
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
glutReshapeFunc(windowReshape);
\r
glutDisplayFunc(display);
\r
glutMouseFunc(mouse);
\r
- glEnable(GL_DEPTH_TEST); // Enable hidden surface removal
\r
\r
makeMenu();
\r
glutMainLoop();
\r
\r
makeMenu();
\r
glutMainLoop();
\r
UCC
git Repository :: git.ucc.asn.au