al_get_opengl_version(3)
π al_get_opengl_version β NAME β¨
okay so bestie, welcome to al_get_opengl_version, a function from the Allegro 5 API β and yes, this whole page lives in the Library Functions Manual, we're fancy like that π
β SYNOPSIS β
#include <allegro5/allegro_opengl.h>
uint32_t al_get_opengl_version(void)
that's it. that's the whole vibe. no arguments, no nothing, she's low maintenance π
π¦ DESCRIPTION π¦
okay so what does she actually do? she returns the OpenGL (or OpenGL ES) version number of the client β meaning the computer the program is running on, iykyk β and it's specifically for the current display. main character energy, she only cares about what's right in front of her π
and the return value is one of those packed numbers that looks kinda cursed at first glance, but it's actually iconic once you get it. the version "1.0" comes back as 0x01000000, "1.2.1" comes back as 0x01020100, and "1.2.2" comes back as 0x01020200, etc. like, the bytes are just the version parts stacked up fr fr π
π¨ BIG IMPORTANT VIBE CHECK π¨ a valid OpenGL context must exist for this function to work. that means you may not call it before al_create_display(3) β like, don't even try it, she will literally not know what to do with herself π do the display thing first, then come ask her about versions, okay? π
πΈ SEE ALSO πΈ
al_get_opengl_variant(3)β the other girlie you wanna check out while you're here π«Ά
and that's the whole page, bestie!! no cap, you're now officially an expert on this one π
signing off from the Allegro reference manual β mwah, see you in the next manpage, slay πβ¨π
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms