git.ucc.asn.au
/
atyndall
/
cits2231.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[atyndall/cits2231.git]
/
scene.c
diff --git
a/scene.c
b/scene.c
index
164d100
..
fc078e2
100644
(file)
--- a/
scene.c
+++ b/
scene.c
@@
-123,8
+123,8
@@
GLfloat angle = -150; /* in degrees */
GLfloat angle2 = 30; /* in degrees */
\r
\r
/* Near and far parameters */
\r
GLfloat angle2 = 30; /* in degrees */
\r
\r
/* Near and far parameters */
\r
-GLfloat near = -10;
\r
-GLfloat far =
2
0;
\r
+GLfloat near = -10
0
;
\r
+GLfloat far =
10
0;
\r
\r
/* Zoom factor for mouse movements */
\r
GLfloat zoomFactor = 1.0;
\r
\r
/* Zoom factor for mouse movements */
\r
GLfloat zoomFactor = 1.0;
\r
@@
-499,7
+499,7
@@
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
- glViewport(0, 0, (GLsizei) w, (GLsizei) h);
\r
+
/*
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
\r
glMatrixMode(GL_PROJECTION);
\r
glLoadIdentity();
\r
if (w <= h)
\r
glMatrixMode(GL_PROJECTION);
\r
glLoadIdentity();
\r
if (w <= h)
\r
@@
-509,7
+509,7
@@
void windowReshape(int w, int h) {
glOrtho(near*(GLfloat)w/(GLfloat)h,
\r
far*(GLfloat)w/(GLfloat)h, near, far, near, far);
\r
glMatrixMode(GL_MODELVIEW);
\r
glOrtho(near*(GLfloat)w/(GLfloat)h,
\r
far*(GLfloat)w/(GLfloat)h, near, far, near, far);
\r
glMatrixMode(GL_MODELVIEW);
\r
- glLoadIdentity();
\r
+ glLoadIdentity();
*/
\r
}
\r
\r
/**
\r
}
\r
\r
/**
\r
@@
-665,7
+665,7
@@
void display() {
\r
// Draw teapot for a test object
\r
glPushMatrix();
\r
\r
// Draw teapot for a test object
\r
glPushMatrix();
\r
- glTranslatef(0.0, 0.
0
, 0.0); // **NOTE: Teapot does not rest on surface
\r
+ glTranslatef(0.0, 0.
5
, 0.0); // **NOTE: Teapot does not rest on surface
\r
glColor3f(0.5, 0.5, 0.5);
\r
glutSolidTeapot(1);
\r
glPopMatrix();
\r
glColor3f(0.5, 0.5, 0.5);
\r
glutSolidTeapot(1);
\r
glPopMatrix();
\r
@@
-696,7
+696,7
@@
void init() {
1.0, /* aspect ratio */
\r
near, /* Z near */
\r
far /* Z far */
\r
1.0, /* aspect ratio */
\r
near, /* Z near */
\r
far /* Z far */
\r
- );
\r
+ );
\r
\r
\r
glLightfv(GL_LIGHT0, GL_POSITION, light0_pos);
\r
\r
\r
glLightfv(GL_LIGHT0, GL_POSITION, light0_pos);
\r
UCC
git Repository :: git.ucc.asn.au