X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=c41dafb3f2e18da812f066cf4b2e3867e51440fc;hp=55b185623f5a2b8f6a46e9d6c735ed285a718bab;hb=9d6524836b1f571761735f0a154b0b8bb8936cfc;hpb=19906e064b3fa55ae0afef432747b8bb7246e36a 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; }