---
name: "al_create_display"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_create_display/3alleg5"
---

# al\_create\_display(3alleg5)

Allegro 5 API

## NAME

al\_create\_display - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  ALLEGRO_DISPLAY *al_create_display(int w, int h)
  ```

## DESCRIPTION

Create a display, or window, with the specified dimensions. The parameters of the display are determined by the last calls to al\_set\_new\_display\_\*. Default parameters are used if none are set explicitly. Creating a new display will automatically make it the active one, with the backbuffer selected for drawing.

Returns NULL on error.

Each display that uses OpenGL as a backend has a distinct OpenGL rendering context associated with it. See al\_set\_target\_bitmap(3alleg5) for the discussion about rendering contexts.

## SEE ALSO

al\_set\_new\_display\_flags(3alleg5), al\_set\_new\_display\_option(3alleg5), al\_set\_new\_display\_refresh\_rate(3alleg5), al\_set\_new\_display\_adapter(3alleg5), al\_set\_new\_window\_title(3alleg5) al\_set\_window\_position(3alleg5)
