---
name: "al_get_opengl_variant"
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_get_opengl_variant"
---

# al\_get\_opengl\_variant(3)

Allegro 5 API

## NAME

al\_get\_opengl\_variant - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_opengl.h>
  int al_get_opengl_variant(void)
  ```

## DESCRIPTION

Returns the variant or type of OpenGL used on the running platform. This function can be called before creating a display or setting properties for new displays. Possible values are:

- ALLEGRO\_DESKTOP\_OPENGL

  Regular OpenGL as seen on desktop/laptop computers.

- ALLEGRO\_OPENGL\_ES

  Trimmed down version of OpenGL used on many small consumer electronic devices such as handheld (and sometimes full size) consoles.

## SEE ALSO

[al\_get\_opengl\_version(3)](/al_get_opengl_version/3.md)
