From: Ash Tyndall Date: Fri, 21 Oct 2011 12:46:06 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=c211ae308b321f2988f4caa28cb828bd68308700;p=atyndall%2Fcits2231.git --- 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);