mesh rendering
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?
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...
what we do in life... echoes in eternity...
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
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...
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...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement