Well, I'm kind of new around here. First of all, I have to say Allegro 5 is great. I've only messed around a little with 4 in the past until I bit the bullet and tried out 5.
Here's my question:
Does al_hold_bitmap_drawing work with al_draw_bitmap_region? Or does it only apply to sub-bitmaps? I've searched the forums, and all I've concluded was: Maybe.
Here's the code I used it with:
al_hold_bitmap_drawing works on any bitmap as long as the src texture is the same.
Thanks, Edgar! That's what I hoped to hear.
So yes, your example is using al_hold_bitmap_drawing correctly. It's designed to work with atlas's and tile maps.
Things that would make it work less effectively include changing the source texture. So if you tried to draw many small independent bitmaps each with their own texture, the performance gain would be practically nil. Because each time the source texture changes, it has to rebind it with the gpu in order to draw from it.
Also to note, al_hold_bitmap_drawing does not work with primitive drawing. It's for bitmap drawing only.