Toggling between "Shapes"

What I’m trying to do is every time the space bar is pressed it switches to the next primitive, but I’m not sure how I would set it up. I’m almost certain I would need a switch statement, but I’m not entirely sure I’m correct.

Also, there are four draw modes in my program, one for the 2d primitives, one for 3d primitives, one for 3d objects using the 2d primitives, and one for a 3d wire frame maze.

When the 1,2,3 or 4 key is pressed, it enters one of the corresponding draw modes.

So when in draw mode 1,2 or 3 whenever the space bar is pressed, it cycles through to the next primitive, or set of primitives.