Jump to content
  • Advertisement


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


For the love of God!! (vertex arrays)

This topic is 6455 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


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!