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:
bab833c
)
(no commit message)
author
Ash Tyndall
<
[email protected]
>
Thu, 20 Oct 2011 11:59:39 +0000
(19:59 +0800)
committer
Ash Tyndall
<
[email protected]
>
Thu, 20 Oct 2011 11:59:39 +0000
(19:59 +0800)
scene.c
patch
|
blob
|
history
diff --git
a/scene.c
b/scene.c
index
cc687e7
..
e8046aa
100644
(file)
--- a/
scene.c
+++ b/
scene.c
@@
-184,7
+184,7
@@
void makeMenu() {
*/
\r
void windowReshape(int w, int h) {
\r
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
\r
*/
\r
void windowReshape(int w, int h) {
\r
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
\r
- glMatrixMode(GL_PROJECTION);
\r
+
/*
glMatrixMode(GL_PROJECTION);
\r
glLoadIdentity();
\r
if (w <= h)
\r
glFrustum(near, far, near*(GLfloat)h/(GLfloat)w,
\r
glLoadIdentity();
\r
if (w <= h)
\r
glFrustum(near, far, near*(GLfloat)h/(GLfloat)w,
\r
@@
-193,7
+193,7
@@
void windowReshape(int w, int h) {
glFrustum(near*(GLfloat)w/(GLfloat)h,
\r
far*(GLfloat)w/(GLfloat)h, near, far, nearClip, farClip);
\r
glMatrixMode(GL_MODELVIEW);
\r
glFrustum(near*(GLfloat)w/(GLfloat)h,
\r
far*(GLfloat)w/(GLfloat)h, near, far, nearClip, farClip);
\r
glMatrixMode(GL_MODELVIEW);
\r
- glLoadIdentity();
\r
+ glLoadIdentity();
*/
\r
}
\r
\r
/**
\r
}
\r
\r
/**
\r
@@
-295,17
+295,17
@@
void motion(int x, int y) {
void display() {
\r
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
\r
glLoadIdentity();
\r
void display() {
\r
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
\r
glLoadIdentity();
\r
- gluLookAt(
\r
- 0.0, 0.0, 30.0, /* eye is at (x,y,z) */
\r
- 0.0, 0.0, 0.0, /* center is at (x,y,z) */
\r
- 0.0, 1.0, 0.0 /* up is in postivie Y direction */
\r
- );
\r
+
//
gluLookAt(
\r
+
//
0.0, 0.0, 30.0, /* eye is at (x,y,z) */
\r
+
//
0.0, 0.0, 0.0, /* center is at (x,y,z) */
\r
+
//
0.0, 1.0, 0.0 /* up is in postivie Y direction */
\r
+
//
);
\r
\r
\r
- glTranslatef(camx, camy, camz);
\r
+
//
glTranslatef(camx, camy, camz);
\r
\r
// **NOTE: Currently this rotation function is all that moves the camera off
\r
// the flat surface. Need to integrate function into gluLookAt
\r
\r
// **NOTE: Currently this rotation function is all that moves the camera off
\r
// the flat surface. Need to integrate function into gluLookAt
\r
- glRotatef(rot, 1.0, 0.0, 0.0);
\r
+
//
glRotatef(rot, 1.0, 0.0, 0.0);
\r
\r
/* Reposition the light source. */
\r
lightPosition[0] = 12*cos(lightAngle);
\r
\r
/* Reposition the light source. */
\r
lightPosition[0] = 12*cos(lightAngle);
\r
@@
-350,8
+350,8
@@
void display() {
* init function; sets initial OpenGL state
\r
*/
\r
void init() {
\r
* init function; sets initial OpenGL state
\r
*/
\r
void init() {
\r
- glMatrixMode(GL_PROJECTION);
\r
- glLoadIdentity();
\r
+
//
glMatrixMode(GL_PROJECTION);
\r
+
//
glLoadIdentity();
\r
\r
//gluPerspective(
\r
// 60.0, /* field of view in degree */
\r
\r
//gluPerspective(
\r
// 60.0, /* field of view in degree */
\r
UCC
git Repository :: git.ucc.asn.au