View Full Version : Need help!

06-08-2003, 04:51 AM
I have created two objects, i draw one in the screen and what i want to do is press a button that will make the first object disappear and the second one take the first object's place?
Any ideas how i can do it?
(Think of it as a book you want to open by pressing a button, first i draw a closed book and then one that looks opened to replace the first one )
Thank you in advance!

06-08-2003, 08:29 AM
First of all don't crosspost
Second this sounds suspiciously like a homework question
Anyway, just use a boolean variable to decide whether or not to draw the first object or the second as in:
if (Variable)

And when you detect a keypress, change the state of the boolean

06-09-2003, 03:11 AM
I have solved my little problem.Thank you anyway.No, i am not expecting you to help me in a "homework" ,i have just started learning openGL two weeks ago (just for my fun) and being new i have a few silly questions.