Triangle rendering problem

I’m starting to implement a 3d modeler with
OpenGL. My current problem is that the
triangles aren’t rendering properly. Some
triangles render properly, some don’t render
at all, and some are half-rendered, with the
halfway point being a horizontal line level
with one of the three vertices.

When rotating my view of the model, the
different triangles flicker between these
three states in a haphazard manner.

I’ve scoured the red book and the Windows
SDK docs for some indication of what I’m
doing wrong. No joy.

Has anyone encountered this problem, and how
did you fix it?


Hi !

Could you maybe post the rendering part of the code ?

Make sure that you use correct order for all vertices so they are all clockwise or counter clockwise (default), it’s easy to mess up if you use triangle strips or fans.

make sure you havn’t set some weird values for the near/far clipping planes, a very low value for the near clipping plane freaks out the resolution of the depth buffer.


Thanks, but the problem appears to have been
driver-related. I was messing around with
my drivers today, and the problem seems to
have gone away.