From: Ash Tyndall Date: Sat, 22 Oct 2011 08:26:43 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=9d6524836b1f571761735f0a154b0b8bb8936cfc;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index 55b1856..c41dafb 100644 --- a/scene.c +++ b/scene.c @@ -122,6 +122,7 @@ void processObjectEvents(int id) { void processTextureEvents(int id) { if ( curObject >= 0 ) { sceneObjs[curObject].texture.id = id; + sceneObjs[curObject].texture.scale = 1; glutPostRedisplay(); } } @@ -279,7 +280,7 @@ void motion(int x, int y) { // h: texture scale float max = (float)height/texscaleFactor; - float scaling = (diffy + max) / max; + float scaling = (-diffy + max) / max; sceneObjs[curObject].texture.scale *= scaling; }