quadtrees and index buffers

Started by
1 comment, last by GekkoCube 20 years, 8 months ago
My quadtree is a pretty big one with approximately 10 vertices per node. I need to utilize vertex and index buffers to improve things since i am currently using DrawPrimitiveUP() to draw per node. Terrible, I know! I understand that the optimal size for a buffer is about 1000 vertices/indices. So, im guessing i need several buffers of size 1000. and i just fill them as i update the tree.... this sounds like a heck of alot of maintenance. one slight miscalculation could cause my computer to go spiraling down and probably give me to blue screen due to some buffer over-run on this XP machine (which i have gotten way too many times as a result of improper use of vertex buffers).
Advertisement
1000 is the recommended number of vertices per DrawIndexedPrimitive call, not the size of the vertex buffer. The actual size your vertex buffer should be depends, but around 2 megabytes is good for the driver to play around with it. 2 megabytes is 65536 vertices, assuming each vertex is 32 bytes.
____________________________________________________________AAAAA: American Association Against Adobe AcrobatYou know you hate PDFs...
holy shoots!!
that makes a big difference.
thanks!

This topic is closed to new replies.

Advertisement