al_backup_dirty_bitmap(3alleg5)
π NAME π
al_backup_dirty_bitmap β it's the Allegro 5 API function that saves your bitmaps' whole entire life, no cap π«Ά
(it lives in the 3alleg5 manual, bestie, iykyk)
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
void al_backup_dirty_bitmap(ALLEGRO_BITMAP *bitmap)
π¦ DESCRIPTION π¦
okay so listen. on some platforms β most notably Windows Direct3D and Android β your textures can just... get lost at literally any moment π. we're talking events like a display resize, or the app switching out (you know, when someone yanks you to the home screen mid-vibe). gone. poof. not the move.
on those platforms, any bitmap you made without the ALLEGRO_NO_PRESERVE_TEXTURE flag gets automatically backed up into system memory every single time al_flip_display is called. like, autosave but make it textures π
. iconic behaviour, honestly.
this function? this function hands you the aux cord. π it gives you way more control over when your bitmaps get backed up. so instead of waiting around for the next flip to do it, you just call this right after you modify a bitmap, and boom β that bitmap is backed up right away instead of during the next flip. instant. immediate. slay.
it's giving "i'll do it myself" energy and honestly? we respect it π
β SINCE β
5.2.1 β yeah she's new here, baby πΈ
[Unstable API]: this API is new and subject to refinement. so like... she's still growing, be gentle with her π
π SEE ALSO π
al_backup_dirty_bitmaps(3alleg5)β the plural one, the whole squad gets backed up πal_create_bitmap(3alleg5)β where the bitmaps come from in the first place π
and that's the whole page, bestie!! β¨ brought to you by the Allegro reference manual, and yeah the footer said the same thing (al_backup_dirty_bitmap(3alleg5)) so you know it's official ππ go forth and back up those dirty bitmaps, periodt π
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms