From: Ash Tyndall Date: Fri, 21 Oct 2011 12:27:01 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=c0ede11eba8b0b5ebfd1a177a630a5d33cc0842b;p=atyndall%2Fcits2231.git --- diff --git a/helper.c b/helper.c index 9da3e1d..bd5f37b 100644 --- a/helper.c +++ b/helper.c @@ -310,7 +310,7 @@ int addSceneObject(int id) { sceneObjs[nObjects].rotation.vect = (vector*)calloc( 3, sizeof(vector[0]) ); if ( sceneObjs[nObjects].scale == NULL || sceneObjs[nObjects].rotation.vect == NULL ) { - sprintf(stderr, "Could not allocate memory for Scene Object! Shutting down!\n"); + fprintf(stderr, "Could not allocate memory for Scene Object! Shutting down!\n"); exit(EXIT_FAILURE); } diff --git a/scene.c b/scene.c index 87e0f00..2a452b0 100644 --- a/scene.c +++ b/scene.c @@ -389,8 +389,9 @@ void display() { SceneObject so = sceneObjs[i]; // Apply rotation vector - /*vector* rv = so.rotation.vect; - glRotatef(so.rotation.parameter, *rv[0], *rv[1], *rv[2]); + vector* rv = so.rotation.vect; + printf("%d, %d, %d\n", *rv[0], *rv[1], *rv[2]); + /* glRotatef(so.rotation.parameter, *rv[0], *rv[1], *rv[2]); // Apply scaling vector vector* sv = so.scale; @@ -405,8 +406,8 @@ void display() { glBindTexture(GL_TEXTURE_2D, so.texture); } else { glBindTexture(GL_TEXTURE_2D, 0); - } -*/ + }*/ + // Draw actual object if ( so.mesh > 0 ) { // drawMesh();