request_scroll(3alleg4)
π request_scroll β the manual page, but make it a group chat π
okay so bestie, we're in the <pink>3alleg4</pink> section of the Allegro manual, and today's main character is request_scroll. she queues up a hardware scroll request with triple buffering, and she's part of the Allegro game programming library. iconic behavior fr fr. β¨
πΈ SYNOPSIS πΈ
#include <allegro.h>
int request_scroll(int x, int y);
that's it. two ints. she's low maintenance like that. π
π¦ DESCRIPTION π¦
so this function is the triple buffering girlie. here's the vibe: you ask for a hardware scroll to the position you want (x, y), and she returns immediately instead of standing there waiting for a retrace like some patient queen. she's not about that waiting life.
the scroll itself happens during the next vertical retrace, which is the whole point β you get to go do other stuff in the meantime. run your other code, live your life, be productive. then when you actually wanna know if the flip happened yet, you hit up poll_scroll() and she'll tell you. π«Ά
β οΈ real talk though: triple buffering is only possible with certain drivers. not every driver is gonna serve this look. to vibe check it, go look at theGFX_CAN_TRIPLE_BUFFERbit inside thegfx_capabilitiesflag and see if it'll actually work with the driver you've got loaded. if that bit's not set, it's giving "not today."
β RETURN VALUE β
- returns zero on success β¨
- returns non-zero otherwise π
that's the whole story. zero = slay, non-zero = something went sideways.
π SEE ALSO π
poll_scroll(3alleg4)β your girl for checking if the flip actually landedrequest_video_bitmap(3alleg4)gfx_capabilities(3alleg4)β where thatGFX_CAN_TRIPLE_BUFFERbit livesscroll_screen(3alleg4)
and that's the page bestie, no cap. π this was Allegro version 4.4.3, and yes, she's still out here serving request_scroll(3alleg4) energy in the year of our lord. go scroll something pretty. πβ¨π¦
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms