shapes demo: cuboctahedron is from the demo itself and not from FreeGLUT
geometry. Hence not supported in shader drawing mode. Now skipping it git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1404 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
465ff5d0d1
commit
b6f1526f6e
@ -759,7 +759,12 @@ key(unsigned char key, int x, int y)
|
||||
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;
|
||||
@ -792,6 +797,13 @@ static void special (int key, int x, int y)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user