Archived

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

For the love of God!! (vertex arrays)

This topic is 6113 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
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