Archived

This topic is now archived and is closed to further replies.

Pactuul

For the love of God!! (vertex arrays)

Recommended Posts

Pactuul    122
I''ve spent about 7 hours looking at this code: void Terrain::CreateMap() { order = new unsigned int[(MAP_SIZE*MAP_SIZE*2)]; heightmap = new float[MAP_SIZE*MAP_SIZE*3]; //CORRECT RandomMap(); } void Terrain::RandomMap() { int x, z, i,j; float fix; glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3,GL_FLOAT,0,heightmap); j= 0; //Fill array like this : x,y,z,y,y,z for(x = 0; x

Share this post


Link to post
Share on other sites
zedzeek    528
have a look on my site (under opengl benchmarks)
here i draw a grid which could be used as a heightmap
i draw it using a few methods eg display list, vertex arrays with triangles, strips, fans etc

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites