I have draw a 2D object. The object(head) consist of hair, eye, nose, etc. In my program, only eye is animating. I notice there is one problem, that is each time the animation executed, all the other parts are repainted.
My question here is, is there any way for me to keep the parts other than the eye to be static (not to be repainted each time the animation is executed), only eye is repainted each time animation is executed.
I’m a freshman at this subject, but I’ll try to respond.
Once you want to actualize your screen you the OpenGL redraws the entire scene in the buffer, an after the buffer is changed and the scene is displayed.
So if you want your application to be faster, you should make the less calculation as possible. So you just change what is necessary and after, I think, you have to say to OpenGL redraw the hole scene.
Beside, there are glPushAttrib() and glPushMatrix. How do I tie together all these? I have one computer graphics reference book, but it does not mentioned how the OpenGL API is to be used in detail.