The video above shows my issue along with my situation in the comments. I’m fairly new to OpenGL and assumed that creating a MPD-based terrain simulation would be a good way to start. The code is split up across several files, so I’d rather not post it unless someone asks for it. I’m hoping someone will be able to recognize the artifacting as being caused by something specific. I’m assuming there are two problems with my program since certain triangles seem to be culled when I don’t have backface culling enabled, and other triangles look to be overlapping other triangles slightly even though they are behind.
I’m running the program under Mac OS X (obviously) and am creating the OpenGL environment through SFML with a 24-bit depth buffer and 8-bit stencil buffer.
How do you know that this has anything to do with triangle stripping? If you draw with a triangle list, do you get similar results?
I’m not sure that has anything to do with triangle stripping either. Could you try it with a different displacement function? If you make it into a dome, for example, it’s easier to see the disconnects. Also are you sharing vertex indices across faces?
Also are you sharing vertex indices across faces?
Yes. I thought that the fact that it was a terrain generator would’ve implied this, sorry for not confirming it.
I’m not entirely sure that it’s GL_TRIANGLE_STRIP that’s causing it either. I put that in the topic name in order to illustrate how I was going about doing what I am. I wouldn’t think that drawing it with a triangle list would make any difference, I’ll try it later since I’m fried right now.
Looks more like z-fighting to me.
Try pushing the near clip plane 10 or 100 times farther to see if it is better.
Sorry that it took so long to reply. Yes, that seems to have worked. Thanks.