al_get_opengl_version(3)

al_get_opengl_version3

Allegro 5 api

Usage

#include <allegro5/allegro_opengl.h>
uint32_t al_get_opengl_version(void)

Overview

Returns the OpenGL or OpenGL ES version number of the client (the computer the program is running on), for the current display. “1.0” is returned as 0x01000000, “1.2.1” is returned as 0x01020100, and “1.2.2” as 0x01020200, etc.

A valid OpenGL context must exist for this function to work, which means you may not call it before al_create_display(3).

From allegro 5.2.11.3-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.