title: DirectX9 - Efficiently Drawing Sprites
body: <p>I'm trying to create a platformer game, and I am taking various sprite blocks, and piecing them together in order to draw the level. This requires drawing a large number of sprites on the screen every single frame. A good computer has no problem handling drawing all the sprites, but it starts to impact performance on older computers. Since this is NOT a big game, I want it to be able to run on almost any computer. Right now, I am using the following DirectX function to draw my sprites:</p>
  
  <pre><code>D3DXVECTOR3 center(0.0f, 0.0f, 0.0f);
  
  D3DXVECTOR3 position(static_cast&lt;float&gt;(x), static_cast&lt;float&gt;(y), z);
  
  (my LPD3DXSPRITE object)-&gt;Draw((sprite texture pointer), NULL, &amp;center, &amp;position, D3DCOLOR_ARGB(a, r, g, b));
  </code></pre>
  
  <p>Is there a more efficient way to draw these pictures on the screen? Is there a way that I can use less complex picture files (I'm using regular png's right now) to speed things up?</p>
  
  <p>To sum it up: What is the most performance friendly way to draw sprites in DirectX? thanks!</p>