Remove referenes to keyboard debugging function. Electing not to use glColorMaterial...
[atyndall/cits2231.git] / scene.c
diff --git a/scene.c b/scene.c
index e003003..69c5a82 100644 (file)
--- a/scene.c
+++ b/scene.c
@@ -122,6 +122,7 @@ void processObjectEvents(int id) {
 void processTextureEvents(int id) {\r
   if ( curObject >= 0 ) {\r
     sceneObjs[curObject].texture.id = id;\r
+    sceneObjs[curObject].texture.scale = 1;\r
     glutPostRedisplay();\r
   }\r
 }\r
@@ -278,8 +279,9 @@ void motion(int x, int y) {
         sceneObjs[curObject].rotation.x += diffx * rotateFactor;\r
 \r
         // h: texture scale\r
+        // **NOTE: Seems to be problem with scaling, delayed action\r
         float max = (float)height/texscaleFactor;\r
-        float scaling = (diffy + max) / max;\r
+        float scaling = (-diffy + max) / max;\r
         sceneObjs[curObject].texture.scale *= scaling;\r
 \r
       }\r
@@ -354,10 +356,8 @@ void display() {
 \r
   glPushMatrix();\r
 \r
-    /* Perform scene rotations based on user mouse/keyboard input. */\r
+    /* Perform scene rotations based on user mouse input. */\r
     glRotatef(rotate*camRotateFactor, 0.0, 1.0, 0.0);\r
-    glTranslatef(camx, camy, camz);\r
-    glRotatef(keyrot, 1.0, 0.0, 0.0);\r
 \r
     drawFloor();\r
     \r
@@ -442,7 +442,7 @@ int main(int argc, char **argv) {
   glDepthRange(0,1);\r
   glEnable(GL_DEPTH_TEST); // Enables Depth Testing\r
   glDepthFunc(GL_LEQUAL);  // the type\r
-  glEnable(GL_CULL_FACE);\r
+  //glEnable(GL_CULL_FACE);\r
   glLineWidth(1.0);\r
 \r
   glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\r

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