My code is basically exactly the same, except for the arrays
Where you use :
[pascal]
////// Terrain Data
indexArray : array[ 0..( MAP_X * MAP_Z * 6 ) - 1 ] of GLuint; // vertex index array
terrain : array[ 0..( MAP_X * MAP_Z ) - 1 ] of array[ 0..2 ] of GLFloat; // heightfield terrain data (0-255); 256x256
colorArray : array[ 0..( MAP_X * MAP_Z ) - 1 ] of array[ 0..2 ] of GLFloat; // heightfield terrain data (0-255); 256x256
texcoordArray : array[ 0..( MAP_X * MAP_Z ) - 1 ] of array[ 0..2 ] of GLFloat; // heightfield terrain data (0-255); 256x256
[/pascal]
I use arrays of pointers to vertices in another array
PS: the pointers in my array can be duplicated
Not sure how the GL calls will handle that.
Does these calls read memory sequentially?
Or will it recognize that I am pointing to different parts of the memory inside the array?
Bookmarks