I have an endless terrain that looks fine at beginning but when it get further and further the graphic(terrain) becomes distorted. I am using code below. Can anyone shed some light why this is happening?
glVertexAttribPointer(kCCVertexAttrib_Position, 2, GL_FLOAT, GL_FALSE, 0, _hillVertices);
glVertexAttribPointer(kCCVertexAttrib_TexCoords, 2, GL_FLOAT, GL_FALSE, 0, _hillTexCoords);
glDrawArrays(GL_TRIANGLE_STRIP, 0, (GLsizei)_nHillVertices);
Capture.PNG (51.2 KB)