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]
/
helper.c
diff --git
a/helper.c
b/helper.c
index
ea80294
..
f6ecc8c
100644
(file)
--- a/
helper.c
+++ b/
helper.c
@@
-293,10
+293,10
@@
void drawAxisLines() {
glEnable(GL_TEXTURE_2D);
}
glEnable(GL_TEXTURE_2D);
}
-
void
addSceneObject(int id) {
+
int
addSceneObject(int id) {
// **NOTE: Currently only adds the teapot
// **NOTE: Currently only adds the teapot
- nObjects += 1; // New object in scene
+ curObject = nObjects;
sceneObjs[nObjects].mesh = -1;
sceneObjs[nObjects].texture = -1;
sceneObjs[nObjects].mesh = -1;
sceneObjs[nObjects].texture = -1;
@@
-308,4
+308,8
@@
void addSceneObject(int id) {
sceneObjs[nObjects].rotation.parameter = 0;
sceneObjs[nObjects].rotation.vect = (vector*)calloc( 3, sizeof(vector[0]) );
sceneObjs[nObjects].rotation.parameter = 0;
sceneObjs[nObjects].rotation.vect = (vector*)calloc( 3, sizeof(vector[0]) );
+
+ nObjects += 1; // New object in scene
+
+ return nObjects;
}
\ No newline at end of file
}
\ No newline at end of file
UCC
git Repository :: git.ucc.asn.au