Jump to content
  • Advertisement

Archived

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

SoD

mesh rendering

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

Hi, there''s a simple way to render a terrain heightmap with triangles fans? i can''t see the structure... Or it''s simpler to use triangles tripes? In a vertex array the fans are a bad implementation or not?

Share this post


Link to post
Share on other sites
Advertisement
Are you going by NeHe''s tutorial? or your own implementation? If its NeHes you may have to alter the way the verts are loaded. I think he loads them into a byte array or something then passes them to be rendered. I have never used triangle fans so i am not sure how they work exactly. give some code or something if that doesnt help. Later-

what we do in life... echoes in eternity...

Share this post


Link to post
Share on other sites
My idea is to have a vertex array containing the heights of the terrain grid and an index array defining the the sequence of vertex forming the triangles. Because i want to put them in a octree i can''t think the best method to store informations in every bounding box. Storing indexes of each triangle is slow or not? I can''t think about using triangle stripes or triangle fans in a vertex list o indexes list in each box of the octree... can you explain me? thanx

Share this post


Link to post
Share on other sites
Yeah i am not sure if the triangle fans and strips would work with with an octree, you may get some messed up terrain. I think you would be better off just drawing triangles from the verts you load in from the heightmap. But again i dont know how the fans and strips work exactly.
In my terrain engine thingy (really wouldnt call it an engine) i load up a heightmap from photoshop, read it into a vector array when i render i just pass the verticies stored in my vector array to opengl. Hope i may have helped a little, if you need some code let me know, later-

what we do in life... echoes in eternity...

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!