• Advertisement
Sign in to follow this  

For beginning programmers-- Never use IDirect3DDevice8::CopyRects

This topic is 4871 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a top down shooter that I was really worried about the low fps it got (around 80). I was pasting a full screen bitmap as the background, and when I changed my method and used a simple rect with a texture stretched over it, my fps went up to around 250!. There was little or no loss of quality as well, so my advice is never use CopyRects.

Share this post


Link to post
Share on other sites
Advertisement
Flat advice like that isn't the best. CopyRects (StretchRect in DX9) has its purposes, but you just need to know when to use them. The main thing to remember is that video cards are no longer concerned much with blitting, with copying image data from one chunk of memory to another. Functions like StretchRect and CopyRects are more like utility functions for things other than rendering stuff directly to the screen. Whenever possible, do your drawing to the screen by using the vertex & pixel pipelines. Even if it is technically 2D, do what you can to treat it as though it were 3D.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement