GLXQUERYVERSION(3gl)

πŸ“¦ version 24.3.3, in opensuse-leap 16.0

πŸ’– 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 ✨

  • glXQueryVersion returns False if it fails, and True otherwise.
  • and major and minor are not updated when False is 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