(no commit message)
authorAsh Tyndall <[email protected]>
Sat, 22 Oct 2011 04:53:41 +0000 (12:53 +0800)
committerAsh Tyndall <[email protected]>
Sat, 22 Oct 2011 04:53:41 +0000 (12:53 +0800)
scene.c

diff --git a/scene.c b/scene.c
index 99a95e5..f4b4343 100644 (file)
--- a/scene.c
+++ b/scene.c
@@ -328,6 +328,8 @@ void motion(int x, int y) {
 \r
     case STATE_OBJECT_ROTATION_TEXTURE_SCALE:\r
 \r
+      // FML DOES NOT ROTATE PROPERLY\r
+\r
       if ( buttonSelected == GLUT_LEFT_BUTTON ) {\r
         // w: rotate on y\r
         sceneObjs[curObject].rotation.y += diffx * rotateFactor;\r
@@ -426,6 +428,9 @@ void display() {
       glPushMatrix();\r
         SceneObject so = sceneObjs[i];\r
 \r
+        // Apply translation vector\r
+        glTranslatef(so.x, so.y, so.z);\r
+\r
         // Apply independant rotation vectors\r
         glRotatef(so.rotation.x, 1.0, 0.0, 0.0);\r
         glRotatef(so.rotation.y, 0.0, 1.0, 0.0);\r
@@ -434,9 +439,6 @@ void display() {
         // Apply scaling vector\r
         glScalef(so.scale[0], so.scale[1], so.scale[2]);\r
 \r
-        // Apply translation vector\r
-        glTranslatef(so.x, so.y, so.z);\r
-\r
         // Apply texture\r
         if ( so.texture.id > 0 ) {\r
           getTexture(so.texture.id);\r

UCC git Repository :: git.ucc.asn.au