1al_hold_bitmap_drawing(3)                            al_hold_bitmap_drawing(3)
2
3
4

NAME

6       al_hold_bitmap_drawing - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              void al_hold_bitmap_drawing(bool hold)
12

DESCRIPTION

14       Enables or disables deferred bitmap drawing.  This allows for efficient
15       drawing of many bitmaps that share a parent bitmap, such as sub-bitmaps
16       from  a tilesheet or simply identical bitmaps.  Drawing bitmaps that do
17       not share a parent is less efficient, so it  is  advisable  to  stagger
18       bitmap  drawing calls such that the parent bitmap is the same for large
19       number of those calls.  While deferred bitmap drawing is  enabled,  the
20       only  functions  that  can be used are the bitmap drawing functions and
21       font drawing functions.  Changing the state such as the blending  modes
22       will result in undefined behaviour.  One exception to this rule are the
23       non-projection transformations.  It is possible to set a new  transfor‐
24       mation while the drawing is held.
25
26       No  drawing  is  guaranteed  to  take place until you disable the hold.
27       Thus, the idiom of this function’s usage is to enable the deferred bit‐
28       map  drawing,  draw as many bitmaps as possible, taking care to stagger
29       bitmaps that share parent bitmaps, and then disable  deferred  drawing.
30       As  mentioned  above, this function also works with bitmap and truetype
31       fonts, so if multiple lines of text need to be drawn, this function can
32       speed things up.
33

SEE ALSO

35       al_is_bitmap_drawing_held(3)
36
37
38
39Allegro reference manual                             al_hold_bitmap_drawing(3)
Impressum