X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=4514e794fd95e161a3cc03d8aff00adb41559c83;hp=77d2c108dc75dbdf1e1e7ea3ea58fcb96ef2f087;hb=c211ae308b321f2988f4caa28cb828bd68308700;hpb=47f587200c6be35f945d40d837a50d3c415c8588 diff --git a/scene.c b/scene.c index 77d2c10..4514e79 100644 --- a/scene.c +++ b/scene.c @@ -120,7 +120,10 @@ void processObjectEvents(int id) { * @param id ID of texutre selected */ void processTextureEvents(int id) { - + if ( curObject >= 0 ) { + sceneObjs[curObject].texture = id; + glutPostRedisplay(); + } } /** @@ -168,7 +171,7 @@ void makeMenu() { glutAddMenuEntry("Position/Scale", M_POSITION_SCALE); glutAddMenuEntry("Rotation/Texture Scale", M_ROTATION_TEXTURE_SCALE); //glutAddSubMenu("Material", materialMenu); - //glutAddSubMenu("Texture", textureMenu); + glutAddSubMenu("Texture", textureMenu); glutAddSubMenu("Ground texture", gTextureMenu); //glutAddSubMenu("Lights", lightMenu); glutAddMenuEntry("Exit", M_EXIT);