|
performance of sub-bitmaps |
Peter Hull
Member #1,136
March 2001
|
noob question of my own!
|
SiegeLord
Member #7,827
October 2006
|
They're the same thing when drawing them, performance wise. Here's literally the totality of the code difference between drawing a bitmap, or its sub-bitmap: if (bitmap->parent) { parent = bitmap->parent; sx += bitmap->xofs; sy += bitmap->yofs; } The only difference I can think of is that your custom rectangle will probably be more lightweight than a bitmap (e.g. every bitmap sets up an orthographic transform just in case its ever used as a target bitmap). But that shouldn't be a huge difference. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Dizzy Egg
Member #10,824
March 2009
|
On the KrampusHack I used al_hold_bitmap_drawing for the first time, and noticed a massive improvement when using a large bitmap and drawing regions from it. It was probably just in my brain but it seemed a bit faster than using subs. Given SiegeLords reply it was probably just background processes changing at the time of testing. The only thing that enforced it was that I was using OpenGL, and thought maybe it was a specific thing to that. I suppose the only useful thing to take from that rant is that al_hold_bitmap_drawing is cool.
---------------------------------------------------- |
Peter Hull
Member #1,136
March 2001
|
Good shout on al_hold_bitmap_drawing I'd forgotten all about that. I'm not really close to having to worry about speed but, if I've time, I'll do some benchmarks to see what difference it makes.
|
tobing
Member #5,213
November 2004
|
The full performance comes with sub-bitmaps, hold bitmap drawing and HW acceleration. |
|