Hi,
Based on triangle strips (inspired by a tutorial from leanopengles(dot)com), I’m drawing a 3x3 terrain where positions of vertexes belong to a paraboloid (3D parabola).
I did add duplicated two vertexes at the end of the row (to produce degenerate triangles) and everything seemed ok when rendering, except there is a line at the middle of the mesh in wireframe mode (see image below).
The list of indices I got is: 0,3,1,4,2,5,5,3,3,6,4,7,5,8 (vertexes in bold are duplicates) if you start counting from the top left, and line-by-line.
I suspect it’s one of the degenerate triangles but doesn’t OpenGL ignore triangles with a null area?
PS: the number of elements I pass to glDrawElements()
is the number of indices above (incl. duplicated indices). And for a flat terrain, there’s no superfluous line or triangle like in the picture attached.