problem with flickering

hi everyone,

i’m writing a program where i have some objects and when they bump each other, the bumped object will move to different position. but i’m getting alot of flickering if i have more than 2 objects to draw.

i used glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB); which is supposed to give me a smooth drawing but i wonder why it doesn’t work?
please advice.

thanks alot for any help!

If you dont mind, could you please show us some code ??