GLXQUERYVERSION(3gl)
π GLXQUERYVERSION π
okay bestie, so this one lives in section 3G of the manual β that's the GLX corner of the library, the whole "let's talk to the X server about OpenGL" situation. and it's genuinely so simple it's almost rude. let's go π¦
β¨ NAME β¨
glXQueryVersion β returns the version numbers of the GLX extension. that's it, that's the whole job, and she does it flawlessly π
β¨ C SPECIFICATION β¨
Bool glXQueryVersion( Display *dpy,
int *major,
int *minor )
delim $$
not me putting the delim $$ line in here too β yeah it's literally in the original, it's a troff formatting thing, we don't question the elders π
β¨ PARAMETERS β¨
dpyβ the connection to the X server. your little phone line to the server, basically π«Άmajorβ returns the major version number of the GLX server extension. it's an out-param, she writes back to you.minorβ returns the minor version number of the GLX server extension. same deal, also an out-param, also writing back.
β¨ DESCRIPTION β¨
so glXQueryVersion hands you back the major and minor version numbers of the GLX extension that the server on the other end of dpy has actually implemented. like, "hey server, what GLX you running?" and she tells you. πΈ
and here's the part that lowkey matters: implementations with the same major version number are upward compatible. that means the version with the higher minor number is a superset of the version with the lower minor number. so newer minor = everything old minor had, plus more. no cap, she's a strict glow-up, never a downgrade β¨
and if you pass major or minor as NULL? they just don't return values. no crash, no drama, they simply do not write. main character energy: if you don't give them a place to land, they don't land π§
β¨ ERRORS β¨
glXQueryVersionreturnsFalseif it fails, andTrueotherwise.- and
majorandminorare not updated whenFalseis returned. so if it flops, your variables are untouched β no half-written garbage, no stale surprises. it's giving "all or nothing" π
β¨ SEE ALSO β¨
glXQueryExtension
okay so that's the whole page, and honestly? iconic. short, sweet, does exactly one thing and does it right. if you want the full β¨ extended universe β¨ of GLX, go read glXQueryExtension next, bestie π₯
and for the record, this page signs off the way it came in β the footer just says GLXQUERYVERSION(), no fancy source line, no date, nothing extra. she said what she said π
π
π¦ where this page comes from
- opensuse-leap 16.0: Mesa-libGL-devel 24.1.7-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms