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:
664a6aa
)
(no commit message)
author
Ash Tyndall
<
[email protected]
>
Tue, 18 Oct 2011 12:35:47 +0000
(20:35 +0800)
committer
Ash Tyndall
<
[email protected]
>
Tue, 18 Oct 2011 12:35:47 +0000
(20:35 +0800)
scene.c
patch
|
blob
|
history
diff --git
a/scene.c
b/scene.c
index
5e492e5
..
0841edd
100644
(file)
--- a/
scene.c
+++ b/
scene.c
@@
-129,6
+129,9
@@
static float lightAngle = 0.0, lightHeight = 5;
GLfloat angle = -150; /* in degrees */
\r
GLfloat angle2 = 30; /* in degrees */
\r
\r
GLfloat angle = -150; /* in degrees */
\r
GLfloat angle2 = 30; /* in degrees */
\r
\r
+GLfloat near = -10;
\r
+GLfloat far = 10;
\r
+
\r
/**
\r
* Prints out error message when file cannot be read
\r
* @param fileName Name of file that could not be read
\r
/**
\r
* Prints out error message when file cannot be read
\r
* @param fileName Name of file that could not be read
\r
@@
-484,9
+487,6
@@
void makeMenu() {
* @param h New height
\r
*/
\r
void windowReshape(int w, int h) {
\r
* @param h New height
\r
*/
\r
void windowReshape(int w, int h) {
\r
- GLdouble near = -10.0;
\r
- GLdouble far = 10.0;
\r
-
\r
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
\r
glMatrixMode(GL_PROJECTION);
\r
glLoadIdentity();
\r
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
\r
glMatrixMode(GL_PROJECTION);
\r
glLoadIdentity();
\r
@@
-670,8
+670,8
@@
void init() {
gluPerspective(
\r
60.0, /* field of view in degree */
\r
1.0, /* aspect ratio */
\r
gluPerspective(
\r
60.0, /* field of view in degree */
\r
1.0, /* aspect ratio */
\r
-
-100.0
, /* Z near */
\r
-
100.0
/* Z far */
\r
+
near
, /* Z near */
\r
+
far
/* Z far */
\r
);
\r
\r
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1);
\r
);
\r
\r
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1);
\r
UCC
git Repository :: git.ucc.asn.au