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
1d9868c
..
b4b61c5
100644
(file)
--- a/
scene.c
+++ b/
scene.c
@@
-112,6
+112,7
@@
void processLightEvents(int id) {
void processObjectEvents(int id) {
\r
// **NOTE: For the testing phase, only have the teapot
\r
addSceneObject(id);
\r
void processObjectEvents(int id) {
\r
// **NOTE: For the testing phase, only have the teapot
\r
addSceneObject(id);
\r
+ glutPostRedisplay();
\r
}
\r
\r
/**
\r
}
\r
\r
/**
\r
@@
-384,17
+385,17
@@
void display() {
drawFloor();
\r
\r
// Draw sceneObjs array
\r
drawFloor();
\r
\r
// Draw sceneObjs array
\r
- glPushMatrix();
\r
- for ( int i = 0; i < nObjects; i++ ) {
\r
+ for ( int i = 0; i < nObjects; i++ ) {
\r
+ glPushMatrix();
\r
SceneObject so = sceneObjs[i];
\r
\r
// Apply rotation vector
\r
SceneObject so = sceneObjs[i];
\r
\r
// Apply rotation vector
\r
-
vector* rv = so.rotation.vect
;
\r
- glRotatef(so.rotation.
parameter, *rv[0], *rv[1], *
rv[2]);
\r
+
GLfloat* rv = so.rotation.vector
;
\r
+ glRotatef(so.rotation.
amount, rv[0], rv[1],
rv[2]);
\r
\r
// Apply scaling vector
\r
\r
// Apply scaling vector
\r
-
vector
* sv = so.scale;
\r
- glScalef(
*sv[0], *sv[1], *
sv[2]);
\r
+
GLfloat
* sv = so.scale;
\r
+ glScalef(
sv[0], sv[1],
sv[2]);
\r
\r
// Apply translation vector
\r
glTranslatef(so.x, so.y, so.z);
\r
\r
// Apply translation vector
\r
glTranslatef(so.x, so.y, so.z);
\r
@@
-418,8
+419,9
@@
void display() {
}
\r
\r
glBindTexture(GL_TEXTURE_2D, 0);
\r
}
\r
\r
glBindTexture(GL_TEXTURE_2D, 0);
\r
- }
\r
- glPopMatrix();
\r
+ glPopMatrix();
\r
+ }
\r
+
\r
\r
// Draw a white ball over the light source
\r
glPushMatrix();
\r
\r
// Draw a white ball over the light source
\r
glPushMatrix();
\r
UCC
git Repository :: git.ucc.asn.au