Archived

This topic is now archived and is closed to further replies.

mishikel

Blt vs. BltFast

Recommended Posts

mishikel    148
I''m writing a generic tile based game and I''m trying to blt onto the back surface with a LPDIRECTDRAWCLIPPER attached to it. According to the docs, I need to use Blt instead of BltFast, but this causes a huge drop in framerate (about 50%). Is this normal? Is there anyway to work around this other than doing some sort of clipping myself and use BltFast? Thanks.

Share this post


Link to post
Share on other sites
Goober King    553
What exactly are your frame rates? Blt to my understanding should
not cause any major fps differences. I have an infant tile engine
and editor that uses manual clipping like mentioned above wich is
easy. I''m lazy to and extream and didn''t feel like learning
about clippers so I chose the easy rout. By the way the tiles
are rendered using bltfast so you realy won''t need blt anyway .

Share this post


Link to post
Share on other sites
granat    122
There is no performance difference between BLT and BLTFAST if your graphics card supports hardware blitting. If it does not then there can be 10% difference (read that in the DX docs once).



[edited by - granat on June 10, 2002 7:01:20 AM]

Share this post


Link to post
Share on other sites
Jim Adams    440
Actually, the differences in speed are very real. On some cards, blt works faster than bltfast, on other video cards it''s the other way around. Blt is considered slower at times because of the features it provides (scaling, etc), but bltfast isn''t always supported directly and it ends up calling blt.

If you are using clippers to only clip tiles to the screen region, than I also suggest using manual clipping - it''s much clearer IMOH.



Jim Adams
home.att.net/~rpgbook
Author, Programming Role-Playing Games with DirectX

Share this post


Link to post
Share on other sites
disgracelands    122
Something else you might want to think about. Blt is *not* always the best method of Bliting between surfaces.

It''s been a while since i looked into it (i switched to D3D) but from what i remember i could get faster transfers and higher frame rates by copying from RAM to VRAM by using memcpy() instead of Blt or Bltfast. There are other posts about this on the forums and it''s not an isolated case.

Of course the proper way to do this would be to use some assembler, maybe even making use of 64 bit registers if available to speed things even further. Not much point if you can hold everything in video memory though.

Share this post


Link to post
Share on other sites