   Comparing DrawPrimitiveUp and dynamic vertex buffers in a 2D engine
  I want to know if anyone can give an estimate on the speeds of DrawPrimitiveUp vs regular dynamic vertex buffers in this scenario:-2D engine-half the sprites are of different textures-one of the only things that can be ''texture batched'' are laser beams (and very few other sprites during each render).-20->50 sprites per frame(4 vertices each = 2 triangles each = 100 triangles per frame).Options:DrawPrimitiveUp() - supposedly slow, but we''re not rendering a whole lot. DrawPrimitive would speed rendering but only in ''batches''. We''re rendering 2 triangles at a time because of all the texture switches.Dynamic VBs - we can batch some sprites such as laser beams. But that''s not a whole lot of performance increase is it?Thanks if anyone can give me an estimate on what to expect.    -=~''''^''''~=-.,_Wicked_,.-=~''''^''''~=-  
  This is no expert opinion, but never do something just because you aren''t doing a lot of it.  Find a better way.  I know I would not feel comfortable using drawPrimitiveUP in my engine.  In every situation I''ve come across, dynamic vb''s are much faster than drawPrimitiveUP.  I''m not sure in this case though, but too me it seems as it would be the same.  ;  You''ll be fine with either one.  DrawPrimitiveUP might be easier in this case, and perfomance wont make a difference because you''ve got so few polygons to render.  Its only going to make a difference when you start rendering thousands of triangles per frame.  ;  Thanks for the input. Pseudo, speed becomes sort of an issue when the particle engine comes into play I guess.  ;  Well for a particle system one should always use dynamic VBs to get your particles to the card. But one should not draw all particles in one go but rather do it like CD3DFont and do a fixed amount so that the card can start rendering while your programme is preparing the next load.BTW: what does "texture batching" mean?  ;  Hippokrates, what do you mean by not rendering them all in one go? Do you mean using a smaller dynamic VB a few times per frame?I meant by texture batching, as in batching rendering by textures, a little mislabeled, sorry.  ;  See nVidia''s developer site for papers on proper dynamic VB usage.  Basically, you should only be locking/filling a small region of the VB at a time, then unlock that region and lock the next.  This allows the hardware to begin rendering the previous region while you''re filling the next.For a particle engine, I''d absolutely recommend dynamic VB''s.  For things where you are only going to be drawing a few dozen polys per frame, DrawPrimitiveUP is just fine, and its easier to work with than dynamic VB''s (IMO).---Dan  