* @param id ID of texutre selected\r
*/\r
void processTextureEvents(int id) {\r
-\r
+ if ( curObject >= 0 ) {\r
+ sceneObjs[curObject].texture = id;\r
+ glutPostRedisplay();\r
+ }\r
}\r
\r
/**\r
glutAddMenuEntry("Position/Scale", M_POSITION_SCALE);\r
glutAddMenuEntry("Rotation/Texture Scale", M_ROTATION_TEXTURE_SCALE);\r
//glutAddSubMenu("Material", materialMenu);\r
- //glutAddSubMenu("Texture", textureMenu);\r
+ glutAddSubMenu("Texture", textureMenu);\r
glutAddSubMenu("Ground texture", gTextureMenu);\r
//glutAddSubMenu("Lights", lightMenu);\r
glutAddMenuEntry("Exit", M_EXIT);\r
SceneObject so = sceneObjs[i];\r
\r
// Apply rotation vector\r
- GLfloat* rv = so.rotation.vector;\r
- glRotatef(so.rotation.amount, rv[0], rv[1], rv[2]);\r
+ glRotatef(so.rotation.amount, so.rotation.vector[0], so.rotation.vector[1], so.rotation.vector[2]);\r
\r
// Apply scaling vector\r
- GLfloat* sv = so.scale;\r
- glScalef(sv[0], sv[1], sv[2]);\r
+ glScalef(so.scale[0], so.scale[1], so.scale[2]);\r
\r
// Apply translation vector\r
glTranslatef(so.x, so.y, so.z);\r