geometry. Hence not supported in shader drawing mode. Now skipping it
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1404
7f0cb862-5218-0410-a997-
914c9d46530a
case 'r': animateXRot=!animateXRot; break;
case 'S':
- case 's': useShader=!useShader; break;
+ case 's':
+ useShader=!useShader;
+ /* Cuboctahedron can't be shown when in shader mode, move to next */
+ if (useShader && NUMBEROF (table)-1 == ( unsigned )function_index)
+ function_index = 0;
+ break;
case 'N':
case 'n': visNormals=!visNormals; break;
if (NUMBEROF (table) <= ( unsigned )function_index)
function_index = 0;
+
+ /* Cuboctahedron can't be shown when in shader mode, skip it */
+ if (useShader && NUMBEROF (table)-1 == ( unsigned )function_index)
+ if (key==GLUT_KEY_PAGE_UP)
+ function_index = 0;
+ else
+ function_index -= 1;
}