Are you blogging on PH? Get your free blog.

How can I optimize my Direct3D Application ?

Following are a few Performance Optimization Tips

  1. Clear only when you must, as this will take much time and your frame rate may drop.
  2. Minimize state changes and group the remaining state changes.
  3. Use smaller textures, if you can do so. For the best possible performance out of your card, put your entire sprite images on one texture and use texture coordinates to select them out. (As using separate textures leads to switching of textures which is a bottleneck for the card).
  4. If the same pixels are drawn less than twice, you can achieve the best performance by turning z-buffering off and rendering the scene from back to front.
  5. Use triangle strips instead of lists and fans. For optimal vertex cache performance, arrange strips to reuse triangle vertices sooner, rather than later.
  6. Gracefully degrade special effects that require a disproportionate share of system resources.
  7. Constantly test your application's performance.
  8. Minimize vertex buffer switches.
  9. Use static vertex buffers where possible.
  10. Use one large static vertex buffer per flexible vertex format (FVF) for static objects, rather than one per object.
  11. If your application needs random access into the vertex buffer in accelerated graphics port (AGP) memory, choose a vertex format size that is a multiple of 32 bytes. Otherwise, select the smallest appropriate format.
  12. Draw using indexed primitives. This can allow for more efficient vertex caching within hardware.
  13. If the depth buffer format contains a stencil channel, always clear the depth and stencil channels at the same time.
  14. Maintain the lowest polygon count you can possibly manage.
FAQ Menu
 

Other Views

corner
Popular resources and forums for programmers on Programmersheaven.com
Assembly, Basic, C, C#, C++, Delphi, Java, JavaScript, Pascal, Perl, PHP, Python, Ruby, Visual Basic
© Copyright 2009 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin. Read the latest words from the publisher here.
Be the first to sign up for Lars Hagelin’s In-depth Outsourcing Newsletter here.
bootstrapLabs Logo A bootstrapLabs project.