al_draw_bitmap speed?

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?


Just make a bench you lazy fool.


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


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

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}


That explains it, thank you Siege

Thread #610497. Printed from