|
|
| blit vs draw_sprite |
|
Daniel Stori
Member #6,056
July 2005
|
Someday I read in this forum or in another that draw_sprite works faster than blit. I like to know if this is really true and if it is, why? In my mind, if draw_sprite has the preoccupation with transparency, it need to be slowly. Thanx |
|
clovekx
Member #3,479
April 2003
|
hmm, you should test it if it's true and let us know --- |
|
miran
Member #2,407
June 2002
|
Yes, draw_sprite is probably a little bit faster than blit, but if you compare draw_sprite with masked_blit, there shouldn't be much difference. -- |
|
clovekx
Member #3,479
April 2003
|
so masked_blit is faster than normal blit? --- |
|
HoHo
Member #4,534
April 2004
|
Let's see ... It seems like blit is faster than draw_sprite, at least on P4 that is Of cource draw_rle_sprite in C-only and 32/16 bit would be about twice as fast, compiled sprite ~4x faster than plain blit __________ |
|
miran
Member #2,407
June 2002
|
Bleh, typo, I meant the other way around. Normal blit should be a little faster than draw_sprite and masked_blit. At least that's what common sense dictates... -- |
|
Thomas Harte
Member #33
April 2000
|
Quote: Bleh, typo, I meant the other way around. Normal blit should be a little faster than draw_sprite and masked_blit. At least that's what common sense dictates... If we're talking about draw_sprite such that it has exactly the same effect as blit (i.e. drawing a sprite with no transparent sections) then I would imagine they'd be the same speed, as if the CPU is doing them then the bottleneck is the memory bandwidth. Conversely if the graphics card is doing them then I would imagine they'd be the same speed as a natural effect of the way hardware is implemented for these things. If however the sprite is 'substantially' smaller than the area of the bitmap containing it, I would expect draw_sprite to overtake blit for the same bottleneck reason as above. What do the empirical results show? [My site] [Tetrominoes] |
|
|