X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=helper.c;h=f6ecc8c13dc3445b388ab55963553d65eef22060;hb=36aa202c760cb524f105a465007983f224cb97e3;hp=ea80294350895454e86a207140731a5ca0d65c5c;hpb=a5f759089021e80d8f2ab1d37e359843f7ca5c52;p=atyndall%2Fcits2231.git diff --git a/helper.c b/helper.c index ea80294..f6ecc8c 100644 --- a/helper.c +++ b/helper.c @@ -293,10 +293,10 @@ void drawAxisLines() { glEnable(GL_TEXTURE_2D); } -void addSceneObject(int id) { +int addSceneObject(int id) { // **NOTE: Currently only adds the teapot - nObjects += 1; // New object in scene + curObject = nObjects; 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]) ); + + nObjects += 1; // New object in scene + + return nObjects; } \ No newline at end of file