From c211ae308b321f2988f4caa28cb828bd68308700 Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Fri, 21 Oct 2011 20:46:06 +0800 Subject: [PATCH] --- scene.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); -- 2.20.1