Weird Texture Problem

I am making a small 3d type game with a bunch of cubes scattered everywhere. I have noticed that when cubes are far enough away they start to flicker and fluxuate. Some of the polygons are not drawn completely, and this is really annoying. I have tried every texture mapping option that I can think of but none have worked. The lighting also messes up when the cubes get farther away. I am just wondering if this is a bug in OpenGL or if there is something I am forgetting to do.

check your back clipping plane. Try some fog, it will improve depth ques and hide your bug.

use 32 depth buffer, it should solve the problems.

Sounds like your talking about Z-Fighting. Have you tried increasing your near clipping plane?

Thanks for the help, but I can’t seem to figure out how to change the number of depth bits in GLUT.