I’m currently being introduced to OpenGL through a class I’m taking. I’ve created a 3d maze that can be rotated and viewed from any angle. The maze consists mostly of cubes (provided by glut) and some display lists of ants and an anteater.
The problem I’m having is that when I rotate the camera, I see weird zig zag shapes forming in the edges between cubes of different colors. If I turn on lighting, it’s even worse: all the cubes have zig zag shapes roughly corresponding to the correct shading on them (I’ve put shading on ‘smooth’) and I can also see the edges between adjacent cubes even though they’re right next to each other. There’s some horrible blockiness going on. However, the ants and the anteater look perfect. Anyone knows why this is happening and how I can stop it?