Blt vs. BltFast

Started by
4 comments, last by mishikel 21 years, 10 months ago
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.
Advertisement
It is faster to use manual clipping. Using Blt or BltFast doesn''t do
much difference. The clippers are used on the primary surface in
windowed applications.

Joakim Asplund
http://megajocke.cjb.net
Joakim Asplundhttp://megajocke.y2.org
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 .
------------------------------------------------------------- neglected projects Lore and The KeepersRandom artwork
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]
-------------Ban KalvinB !
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
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.

This topic is closed to new replies.

Advertisement