"51 Chef", "52 Parasaurolophus", "53 Rooster", "54 T-rex"\r
};\r
\r
-const char *materialMenuEntries[8] = {\r
- "All R/G/B", "Ambient R/G/B", "Diffuse R/G/B", "Specular R/G/B",\r
- "All Amb/Diff/Spec/Shine", "Red Amb/Diff/Spec/Shine", "Green Amb/Diff/Spec/Shine", "Blue Amb/Diff/Spec/Shine"\r
-};\r
+\r
\r
void processMainEvents(int id) {\r
switch (id) {\r
\r
\r
void makeMenu() {\r
- glutCreateMenu(processMainEvents);\r
+ int mainMenu = glutCreateMenu(processMainEvents);\r
\r
glutAddMenuEntry("Rotate/Move Camera", ROTATE_MOVE_CAMERA);\r
//Add object\r
glutAddMenuEntry("Position/Scale", POSITION_SCALE);\r
glutAddMenuEntry("Rotation/Texture Scale", ROTATION_TEXTURE_SCALE);\r
//material\r
+ \r
+ int materialMenu = glutCreateMenu(processMaterialEvents);\r
+ glutAddMenuEntry("All R/G/B", MATERIAL_ALL_RGB);\r
+ glutAddMenuEntry("Ambient R/G/B", MATERIAL_AMBIENT_RGB);\r
+ glutAddMenuEntry("Diffuse R/G/B", MATERIAL_DIFFUSE_RGB);\r
+ glutAddMenuEntry("Specular R/G/B", MATERIAL_SPECULAR_RGB);\r
+ glutAddMenuEntry("All Amb/Diff/Spec/Shine", MATERIAL_ALL_ADSS);\r
+ glutAddMenuEntry("Red Amb/Diff/Spec/Shine", MATERIAL_RED_ADSS);\r
+ glutAddMenuEntry("Green Amb/Diff/Spec/Shine", MATERIAL_GREEN_ADSS);\r
+ glutAddMenuEntry("Blue Amb/Diff/Spec/Shine", MATERIAL_BLUE_ADSS);\r
+\r
+ glutSetMenu(mainMenu);\r
+ glutAddSubMenu("Material", materialMenu);\r
+ \r
//texture\r
//ground texture\r
//lights\r