1al_lock_bitmap_region(3)                              al_lock_bitmap_region(3)
2
3
4

NAME

6       al_lock_bitmap_region - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              ALLEGRO_LOCKED_REGION *al_lock_bitmap_region(ALLEGRO_BITMAP *bitmap,
12                 int x, int y, int width, int height, int format, int flags)
13

DESCRIPTION

15       Like  al_lock_bitmap(3),  but only locks a specific area of the bitmap.
16       If the bitmap is a video bitmap, only that area of the texture will  be
17       updated  when  it  is  unlocked.  Locking only the region you indend to
18       modify will be faster than locking the whole bitmap.
19
20              Note: Using the ALLEGRO_LOCK_WRITEONLY with a blocked pixel for‐
21              mat   (i.e. formats  for  which  al_get_pixel_block_width(3)  or
22              al_get_pixel_block_height(3) do not return 1)  requires  you  to
23              have  the  region be aligned to the block width for optimal per‐
24              formance.  If it is not, then the function will have to lock the
25              region  with  the ALLEGRO_LOCK_READWRITE instead in order to pad
26              this region with valid data.
27

SEE ALSO

29       ALLEGRO_LOCKED_REGION(3), ALLEGRO_PIXEL_FORMAT(3), al_unlock_bitmap(3)
30
31
32
33Allegro reference manual                              al_lock_bitmap_region(3)
Impressum