tomb18

01-08-2017, 06:45 PM

I need to draw a 3d mesh and there will be up to 200,000 triangles drawn. These triangles have vertices of x,y,z but x and z are always the same. Only the Y changes. This is essentially a height map.

I am looking at ways to render this and so far I have tried the following in terms of complexity:

glDrawArray - very simple. I just put the data in an array. One opengl call for all 200,000 triangles.

glDrawElements using triangles - also fairly simple, the indices are just 0 to 200,000. One opengl call for all 200,000 triangles.

glDrawElements using triangle strips - the complication here is generating the indices. How does one determine where they change?

The Y vertices will be changing every 100ms or so - for this I use buffersubdata.

So what would be the advantages or disadvantages of each? This is all that will be rendered. 200,000 triangles and that's it.

Thanks

I am looking at ways to render this and so far I have tried the following in terms of complexity:

glDrawArray - very simple. I just put the data in an array. One opengl call for all 200,000 triangles.

glDrawElements using triangles - also fairly simple, the indices are just 0 to 200,000. One opengl call for all 200,000 triangles.

glDrawElements using triangle strips - the complication here is generating the indices. How does one determine where they change?

The Y vertices will be changing every 100ms or so - for this I use buffersubdata.

So what would be the advantages or disadvantages of each? This is all that will be rendered. 200,000 triangles and that's it.

Thanks