al_wait_for_vsync(3alleg5)

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

πŸ¦‹ al_wait_for_vsync(3alleg5) πŸ¦‹

okay bestie, listen β€” this is the Allegro 5 page for al_wait_for_vsync, and it's giving "sync me to the monitor's vertical retrace" energy. Let's get into it. πŸ’–

πŸŽ€ NAME πŸŽ€

al_wait_for_vsync - Allegro 5 API

✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

bool al_wait_for_vsync(void)

πŸ’… DESCRIPTION πŸ’…

It waits for the beginning of a vertical retrace. Lowkey simple, right? But ngl, some driver/card/monitor combinations may not be capable of this. So don't just assume it'll always work. 😭

Also, bestie, note how al_flip_display(3alleg5) usually already waits for the vertical retrace, so unless you are doing something special, there is no reason to call this function. Like, it's already doing the thing, so why double up? πŸ™ˆ

It returns false if not possible, and true if successful. That's the whole mood. ✨

πŸ‘€ SEE ALSO πŸ‘€

al_flip_display(3alleg5)


mwah πŸ’‹ from the Allegro reference manual β€” Allegro 5, page al_wait_for_vsync(3alleg5). No date printed on the page, but the reference manual vibes are eternal. πŸ«ΆπŸ’– periodt.

πŸ“¦ where this page comes from