al_lock_bitmap_region
ALLEGRO_LOCKED_REGION *al_lock_bitmap_region(ALLEGRO_BITMAP *bitmap,
int x, int y, int width, int height, int format, int flags)
Introduced in 5.0.0
Like al_lock_bitmap, but only locks a specific area of the bitmap. If the bitmap is a display bitmap, only that area of the texture will be updated when it is unlocked. Locking only the region you indend to modify will be faster than locking the whole bitmap.
See also: ALLEGRO_LOCKED_REGION, ALLEGRO_PIXEL_FORMAT, al_unlock_bitmap
Examples: ex_blit, ex_lockbitmap, ex_logo, ex_threads2
Most helpful discussions:
- Segmentation Fault while "al_convert_mask_to_alpha".
- "al_put_pixel" not working
- Bad memory leak in al_get_pixel on Linux?
- PixelBots Combat Prototype 1
- Crash getting text width when maximizing with D3D Driver
- al_autocrop_bitmap() ?
- [A5] Bitmaps to OpenGL textures
- [A5] TTF Fonts not caching correctly?
- Load raw pixel data into Allegro Bitmap
- Determine if an image is solid