al_resize_display(3alleg5)
π al_resize_display β Allegro 5 API π
okay bestie, welcome to the al_resize_display(3alleg5) page, aka the one where you get to β¨change how big your window isβ¨ at runtime. no cap, it's lowkey one of the most useful little functions in the Allegro 5 API. let's get into it π«Ά
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
bool al_resize_display(ALLEGRO_DISPLAY *display, int width, int height)
like. that's the whole signature. she's simple, she's iconic, she serves π
π¦ DESCRIPTION π¦
So the vibe here is: you call this and it resizes the display. that's the job. main character energy fr fr.
It returns true on success, or false on error β so pls actually check that return value, bestie, don't just ignore her π
The tea is that this works on both fullscreen and windowed displays, and it does not care about the ALLEGRO_RESIZABLE flag at all. Like, that flag is simply not invited to this party. it works regardless π
Also, and this is the part that's easy to miss: it adjusts the clipping rectangle to the full size of the backbuffer. so your clipping rect gets updated for you, no extra steps, you're welcome π
π SEE ALSO π
al_acknowledge_resize(3alleg5)β go read that one next, it's giving related-content and she's important π
and that's the page, babes! this was the Allegro reference manual edition of al_resize_display(3alleg5) β go resize something, you got 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