Re: [GD-General] Zen of Model Rendering
Brought to you by:
vexxed72
From: Thatcher U. <tu...@tu...> - 2003-01-18 19:20:20
|
On Jan 18, 2003 at 08:07 +1100, Chris Brodie wrote: > For a surface to be rendered you of course need a separate > DrawArrays call (or something similar in D3D). I knew this so I used > separate index lists. Now I render the triangles and it all works > well, however performance bites and I have a thought. I have a > single Vertex array. If I had an object of 10k polys using 10 > textures I now presented the vertex array to the API 10 times. This > has got to be bad, since on average 90% of those verts won't even be > needed. I guess I've found my performance problem. > > So I decompose the giant vertex array in to mini vertex arrays per > surface and remap the indices back in to the new array. This works, > but I'm left feeling all those duplicate verts in each array (along > seams for example) are evil. > > Have I don't the right thing? Is this 'the' way to do it? Yes, this is the normal way. The duplicated edge verts are usually much less evil than the alternatives. -- Thatcher Ulrich http://tulrich.com |