Right, now that I can no longer fall through the height map: How would you texture a it?
My height map stores a 2D array of height values, when I render the map I have a nested for loop that places a vertices where the need to be.
for (int z = 0; z < values.length - 1; z++) {
GL11.glBegin(GL_TRIANGLE_STRIP);
for (int x = 0; x < values[z].length; x++) {
GL11.glVertex3f(x, interpolateHeight(x, z), z);
GL11.glVertex3f(x, interpolateHeight(x, z + 1), z + 1);
}
GL11.glEnd();
GL11.glFlush();
}
I have tried to place a texture co-ordinate at every vertex but that caused a lot of lag and a hideous image.
What is the most effective way to texture a height map and how would I do it?
thanks in advance,
siD