al_convert_memory_bitmaps(3alleg5)
β¨ al_convert_memory_bitmaps β¨
okay bestie, so this one lives in the Allegro 5 API and it's genuinely one of those "wait, that's it?" functions that saves your whole entire life. let's get into it π
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
void al_convert_memory_bitmaps(void)
likeβ¦ that's the whole signature. no args, no return, just vibes and a glow-up. π¦
π DESCRIPTION π
so here's the tea, bestie π
if you create a bitmap when there is no current display β for example because you haven't called al_create_display(3alleg5) in the current thread β and you're using the ALLEGRO_CONVERT_BITMAP bitmap flag (which, btw, is set by default, no cap), then the bitmap will be created successfullyβ¦ but as a memory bitmap. it's giving "made it work, but at what cost" π
and that's literally what this function is for. al_convert_memory_bitmaps converts all such bitmaps to proper video bitmaps belonging to the current display. glow-up complete, main character energy, periodt π
β οΈ also important: video bitmaps get automatically converted back to memory bitmaps when the last display is destroyed. so it's a whole two-way street, iykyk.
and one more thing because details matter:
this operation will preserve all bitmap flags except ALLEGRO_VIDEO_BITMAP and ALLEGRO_MEMORY_BITMAP. those two? yeah, they get rewritten, that's the whole point of the conversion. everything else stays exactly as it was π
π SINCE π
5.2.0 β so she's been iconic for a minute β¨
π SEE ALSO π
and that's the page!! π«Ά from the Allegro reference manual, filed under al_convert_memory_bitmaps(3alleg5) β go forth and convert those bitmaps, bestie, you're literally so good at this ππΈπ
π¦ 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