Archived

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

cliffski

DrawIndexed Primitive is slower?

Recommended Posts

I just spent a lot of time converting my Direct3D engine and its slower! My old system was to render each particle in my particle engine as a 2 triangle list. This meant a DrawPrimitive() call per particle which is clearly bunk. So i rewrote the system so each cloud of particles maintains an array of vertices, and at render time I build up a list of what vertices to render when, and do one call of DrawIndexedPrimitive per cloud. This means I am now rendering maybe 5 particles per cloud on average (10 triangles per call instead of 2).Yet this is working out SLOWER than the old system. much slower in fact What am I doing wrong? I though DrawIndexedPrimitive with few calls was supposed to be much faster for this kind of thing. Any ideas? http://www.positech.co.uk

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
make sure that when you call DrawIndexed primitive that you only pass in the vertices that are being used.DO NOT pass in your entire vertex list and then only render a section of it because DrawIndexed primitive will transform ALL vertices in the vertex list.If you call draw primitive 10 times the entire vertex list you pass in will get transformed and lit 10 times.

Using vertex buffers stops this problem

hope this helps

Share this post


Link to post
Share on other sites