---
name: "al_set_new_display_flags"
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_set_new_display_flags"
---

# al\_set\_new\_display\_flags(3)

Allegro 5 API

## NAME

al\_set\_new\_display\_flags - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  void al_set_new_display_flags(int flags)
  ```

## DESCRIPTION

Sets various flags to be used when creating new displays on the calling thread. flags is a bitfield containing any reasonable combination of the following:

- ALLEGRO\_WINDOWED

  Prefer a windowed mode.

  Under multi-head X (not XRandR/TwinView), the use of more than one adapter is impossible due to bugs in X and GLX. [al\_create\_display(3)](/al_create_display/3.md) will fail if more than one adapter is attempted to be used.

- ALLEGRO\_FULLSCREEN\_WINDOW

  Make the window span the entire screen. Unlike ALLEGRO\_FULLSCREEN this will never attempt to modify the screen resolution. Instead the pixel dimensions of the created display will be the same as the desktop.

  The passed width and height are only used if the window is switched out of fullscreen mode later but will be ignored initially.

  Under Windows and X11 a fullscreen display created with this flag will behave differently from one created with the ALLEGRO\_FULLSCREEN flag - even if the ALLEGRO\_FULLSCREEN display is passed the desktop dimensions. The exact difference is platform dependent, but some things which may be different is how alt-tab works, how fast you can toggle between fullscreen/windowed mode or how additional monitors behave while your display is in fullscreen mode.

  Additionally under X, the use of more than one adapter in multi-head mode or with true Xinerama enabled is impossible due to bugs in X/GLX, creation will fail if more than one adapter is attempted to be used.

- ALLEGRO\_FULLSCREEN

  Prefer a fullscreen mode.

  Under X the use of more than one FULLSCREEN display when using multi-head X, or true Xinerama is not possible due to bugs in X and GLX, display creation will fail if more than one adapter is attempted to be used.

  *Note:* Prefer using ALLEGRO\_FULLSCREEN\_WINDOW as it typically provides a better user experience as the monitor doesn’t change resolution and switching away from your game via Alt-Tab works smoothly. ALLEGRO\_FULLSCREEN is typically less well supported compared to ALLEGRO\_FULLSCREEN\_WINDOW.

- ALLEGRO\_RESIZABLE

  The display is resizable (only applicable if combined with ALLEGRO\_WINDOWED).

- ALLEGRO\_MAXIMIZED

  The display window will be maximized (only applicable if combined with ALLEGRO\_RESIZABLE). Since: 5.1.12

- ALLEGRO\_OPENGL

  Require the driver to provide an initialized OpenGL context after returning successfully.

- ALLEGRO\_OPENGL\_3\_0

  Require the driver to provide an initialized OpenGL context compatible with OpenGL version 3.0.

- ALLEGRO\_OPENGL\_FORWARD\_COMPATIBLE

  If this flag is set, the OpenGL context created with ALLEGRO\_OPENGL\_3\_0 will be forward compatible *only*, meaning that all of the OpenGL API declared deprecated in OpenGL 3.0 will not be supported. Currently, a display created with this flag will *not* be compatible with Allegro drawing routines; the display option ALLEGRO\_COMPATIBLE\_DISPLAY will be set to false.

- ALLEGRO\_OPENGL\_ES\_PROFILE

  Used together with ALLEGRO\_OPENGL, requests that the OpenGL context uses the OpenGL ES profile. A specific version can be requested with [al\_set\_new\_display\_option(3)](/al_set_new_display_option/3.md). Note: Currently this is only supported by the X11/GLX driver. Since: 5.1.13

- ALLEGRO\_OPENGL\_CORE\_PROFILE

  Used together with ALLEGRO\_OPENGL, requests that the OpenGL context uses the OpenGL Core profile. A specific version can be requested with [al\_set\_new\_display\_option(3)](/al_set_new_display_option/3.md). Note: Currently this is only supported by the X11/GLX driver. Since: 5.2.7

- ALLEGRO\_DIRECT3D

  Require the driver to do rendering with Direct3D and provide a Direct3D device.

- ALLEGRO\_PROGRAMMABLE\_PIPELINE

  Require a programmable graphics pipeline. This flag is required to use [ALLEGRO\_SHADER(3)](/ALLEGRO_SHADER/3.md) objects. Since: 5.1.6

- ALLEGRO\_FRAMELESS

  Try to create a window without a frame (i.e. no border or titlebar). This usually does nothing for fullscreen modes, and even in windowed modes it depends on the underlying platform whether it is supported or not. Since: 5.0.7, 5.1.2

- ALLEGRO\_NOFRAME

  Original name for ALLEGRO\_FRAMELESS. This works with older versions of Allegro.

- ALLEGRO\_GENERATE\_EXPOSE\_EVENTS

  Let the display generate expose events.

- ALLEGRO\_GTK\_TOPLEVEL

  Create a GTK toplevel window for the display, on X. This flag is conditionally defined by the native dialog addon. You must call [al\_init\_native\_dialog\_addon(3)](/al_init_native_dialog_addon/3.md) for it to succeed. ALLEGRO\_GTK\_TOPLEVEL is incompatible with ALLEGRO\_FULLSCREEN. Since: 5.1.5

- ALLEGRO\_DRAG\_AND\_DROP

  If a display is created with the ALLEGRO\_DRAG\_AND\_DROP flag it will generate ALLEGRO\_EVENT\_DROP events when files or text are dropped over the display.

  *\[Unstable API\]:* This is an experimental feature and currently only works for the X11 backend.

  Since: 5.2.9

0 can be used for default values.

## SEE ALSO

[al\_set\_new\_display\_option(3)](/al_set_new_display_option/3.md), [al\_get\_display\_option(3)](/al_get_display_option/3.md), [al\_set\_display\_option(3)](/al_set_display_option/3.md)
