---
name: "al_flip_display"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_flip_display"
---

# al\_flip\_display(3)

Allegro 5 API

## NAME

al\_flip\_display - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  void al_flip_display(void)
  ```

## DESCRIPTION

Copies or updates the front and back buffers so that what has been drawn previously on the currently selected display becomes visible on screen. Pointers to the special back buffer bitmap remain valid and retain their semantics as the back buffer, although the contents may have changed.

*Note:* If not using the ALLEGRO\_SINGLE\_BUFFER option, you typically want to redraw every pixel of the backbuffer bitmap to avoid uninitialized memory artifacts.

Several display options change how this function behaves:

- •

  With ALLEGRO\_SINGLE\_BUFFER, no flipping is done. You still have to call this function to display graphics, depending on how the used graphics system works.

- •

  The ALLEGRO\_SWAP\_METHOD option may have additional information about what kind of operation is used internally to flip the front and back buffers.

- •

  If ALLEGRO\_VSYNC is 1, this function will force waiting for vsync. If ALLEGRO\_VSYNC is 2, this function will not wait for vsync. With many drivers the vsync behavior is controlled by the user and not the application, and ALLEGRO\_VSYNC will not be set; in this case [al\_flip\_display(3)](/al_flip_display/3.md) will wait for vsync depending on the settings set in the system’s graphics preferences.

## SEE ALSO

[al\_set\_new\_display\_flags(3)](/al_set_new_display_flags/3.md), [al\_set\_new\_display\_option(3)](/al_set_new_display_option/3.md)
