compiled vertex arrays & glDrawElements
im trying to get my heightmap to be rendered with vertex arrays, using glDrawElements..
well my problem is that everything is ok, except the terrain doesnt show up with i do this code..
well im new to this here, so i dunno what can be wrong...
VertexArray is an array of floats: [Landscape.mapWidth * Landscape.mapHeight * 3];
IndexArray is an array of unsigned ints: [Landscape.mapWidth * Landscape.mapHeight * 3 * 2];
(this holds the indices of the 2 triangles that makes each tile in the terrain)
well anyone have any idea? i've seen some code around on this, but didnt help much..
this might have sum stupid code, but well im trying this without any info.. cant find any that tells me what these funcs really do
glLockArraysEXT(0, Landscape.mapWidth * Landscape.mapHeight * 2); // lock vertex arrays
glVertexPointer(3, GL_FLOAT, 0, Landscape.VertexArray);
glDrawElements(GL_QUADS, 4, GL_UNSIGNED_INT, Landscape.IndexArray);
glUnlockArraysEXT(); // unlock vertex arrays