Sign in to follow this  
_Phalanx_

For beginning programmers-- Never use IDirect3DDevice8::CopyRects

Recommended Posts

_Phalanx_    180
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
Agony    3452
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this