I am trying to make terrain mesh, and for now got something like this:
GL.PushMatrix();
GL.Begin(BeginMode.TriangleStrip);
for (int i = 0; i < 6; i++)
{
for (int j = 0; j < 6; j++)
{
GL.Vertex2(0 + 50 * j, 0 + 50 * i);
GL.Vertex2(0 + 50 * j, 0 + 50 + 50 * i);
}
}
GL.End();
GL.PopMatrix();
But it doesn’t look like supposed, how should it be done properly?
If you want to draw the entire terrain as a single triangle strip, you need to use “degenerate triangles” (triangles that have two or three vertices at same position) and draw even and odd rows in different directions. Here‘s one tutorial about it, although for DirectX, but the loops for positioning the vertices should be pretty much the same.