some help regarding flickering

Okay!! I am getting what you are saying and yes none of the objects are flickering. And also one more problem I found now that when the application is running and if I minimize it then again maximize, it restarts again automatically and how can I make the bar in bottom to move smoothly?

That is because you have no resize function!

go and look up glutResizeFunc

to make the bar smoother, you simply neet to translate it at smaller intervals.

You need to learn how to identify problems, even if it is just comparing a basic openGL application with your own. Try to learn something new about openGL every day! then you wont need to rely on others so much to pick at your mistakes.

Dale

Its because I have started to work on openGL recently and I have seen some tutorials on net. Can you tell me a book which covers all these basic points?

If I translate it at smaller interval then its moving too slow

I have only just started using openGL too, i.e the last month. The key to learning anything is to study it.

search online for the red book, it has lots of information, just be sure that you understand what it is trying to tell you.

P.s a “thankyou for your time & help” goes a long way.

Dale

so find the balance! also, i noticed that you are using glutIdleFunc and glutTimerFunc, these may be impacting on that.

Dale

I really appreciate you gave so much time for my problems. Thanks alot for your valuable time. :slight_smile: