Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » al_draw_bitmap speed?

This thread is locked; no one can reply to it. rss feed Print
al_draw_bitmap speed?
Alianix
Member #10,518
December 2008
avatar

Just curious does anyone have an idea whether in general al_draw_bitmap or al_draw_bitmap_region is faster if the target bitmap is the same and the source bitmap is the same?

GullRaDriel
Member #3,861
September 2003
avatar

Just make a bench you lazy fool.

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Alianix
Member #10,518
December 2008
avatar

Gosh man you're a genius, but I think you knew that already!

SiegeLord
Member #7,827
October 2006
avatar

Let me answer this question with an excerpt from Allegro's source:

#SelectExpand
1/* Function: al_draw_tinted_bitmap 2 */ 3void al_draw_tinted_bitmap(ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR tint, 4 float dx, float dy, int flags) 5{ 6 ASSERT(bitmap); 7 al_draw_tinted_bitmap_region(bitmap, tint, 0, 0, 8 bitmap->w, bitmap->h, dx, dy, flags); 9} 10 11 12/* Function: al_draw_bitmap 13 */ 14void al_draw_bitmap(ALLEGRO_BITMAP *bitmap, float dx, float dy, int flags) 15{ 16 al_draw_tinted_bitmap(bitmap, solid_white, dx, dy, flags); 17} 18 19 20/* Function: al_draw_bitmap_region 21 */ 22void al_draw_bitmap_region(ALLEGRO_BITMAP *bitmap, 23 float sx, float sy, float sw, float sh, float dx, float dy, int flags) 24{ 25 al_draw_tinted_bitmap_region(bitmap, solid_white, sx, sy, sw, sh, 26 dx, dy, flags); 27}

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Alianix
Member #10,518
December 2008
avatar

That explains it, thank you Siege

Go to: