toggle between display

hi, i need some advice on how to toggle between displaying glutSolidCube and glutWireCube by pressing a keyboard button. Thanx

Wow, this is faaaar from advanced.

global bool bWireRender
  if(key == 'this')
     bWireRender = true;
  if(key == 'that')
     bWireRender = false;


Are you kidding? This is the most advanced question in the history of computer graphics…or just programming in general. Carmack and Sweeney are working around the clock trying to figure it out right now!!

hehe :smiley:


Thanx for the advice but i suppose this code toggles by using 2 different keyboard buttons. Is there any way i can toggle using 1 keyboard button, for example, i press ‘a’ to change to glutWireCube and press ‘a’ again to change back to glutSolidCube?

bWireRender = !bWireRender and what about this? This isnt adnvaced question, if someone has similar problem doesnt post it here, pls :slight_smile: