X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=aabad998ed4fabc2292f27858e5d33f98575393c;hp=e003003006303c0b9188b65420630dc8f0d441c9;hb=e9f79475908e1e8b0de29edf00f95a1fd3f80e7d;hpb=98e1aa8665249d427fee1bedceec646bd16c35b6;ds=sidebyside diff --git a/scene.c b/scene.c index e003003..aabad99 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(); } } @@ -278,8 +279,9 @@ void motion(int x, int y) { sceneObjs[curObject].rotation.x += diffx * rotateFactor; // h: texture scale + // **NOTE: Seems to be problem with scaling, delayed action float max = (float)height/texscaleFactor; - float scaling = (diffy + max) / max; + float scaling = (-diffy + max) / max; sceneObjs[curObject].texture.scale *= scaling; } @@ -442,7 +444,7 @@ int main(int argc, char **argv) { glDepthRange(0,1); glEnable(GL_DEPTH_TEST); // Enables Depth Testing glDepthFunc(GL_LEQUAL); // the type - glEnable(GL_CULL_FACE); + //glEnable(GL_CULL_FACE); glLineWidth(1.0); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);