al_acknowledge_resize(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… NAME πŸ’…

ok so this is al_acknowledge_resize β€” it's part of the Allegro 5 API, bestie, and it's literally the thing you call to tell the graphics driver "yes queen, go ahead and resize" πŸ¦‹


✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

bool al_acknowledge_resize(ALLEGRO_DISPLAY *display)

πŸŽ€ DESCRIPTION πŸŽ€

okok so picture this: your display is resizable, and the user goes and drags the window edge around like it's a fidget toy, and boom β€” you get a resize event. But here's the thing, bestie, nothing happens yet. You gotta say something first. πŸ™ˆ

If you actually want the display to be resized, you must call this function so the graphics driver knows it's allowed to go ahead and resize the display. It returns true on success. slay. πŸ’–

It also does a couple of little housekeeping things while it's in there:

  • It adjusts the clipping rectangle to the full size of the backbuffer 🫢
  • It resets the backbuffer's projection transform back to the default orthographic transform (peep al_use_projection_transform(3alleg5) for that one) ✨
⚠️ okay but important: a resize event might be outdated by the time you actually get around to acknowledging it. Like, further resize events could've been generated in the meantime. So the thing you're acknowledging might not be the thing that's happening anymore. it's giving "you're on a delay, babe" πŸ’€

🌈 SEE ALSO 🌈


mwah πŸ’‹ that's the whole page, and it's from the Allegro reference manual β€” al_acknowledge_resize(3alleg5), no cap. go forth and resize responsibly, icon πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from