Hi all,
I have a problem again(think should change my nick to problem_kid!!!)
Im trying to produce a animation of a object(cube) and tried to scale it to double the size and back to the normal size and back and forth. I have used a glutTimerFunc to animate it. The problem is that my object will continue to get bigger til it disappear out of my viewing area. Why doesn’t it go back to the normal size.
You cannot put the glScale call in the timer function, you should only update a variable to keep track of the current scale and call glutPostReDisplay(), in your display callback function you should put the glScale before you render the object and then it will work fine.