GLXQUERYCONTEXTINFOEXT(3gl)

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

✨ NAME ✨

glXQueryContextInfoEXT β€” bestie, this is the one that queries context information. that's it, that's the whole job πŸ’…

okay so real quick, we're in section 3G of the manual, this is the GLX corner of the world, and this little function is your go-to when you wanna peek at what a rendering context is actually made of. let's get into it πŸ¦‹


🌸 C SPECIFICATION 🌸

int glXQueryContextInfoEXT( Display *dpy,
                            GLXContext ctx,
                            int attribute,
                            int *value )

and also, straight from the source, this line right here:

delim $$

yep, that's in there too. iconic formatting business, we don't question it ✨


πŸŽ€ PARAMETERS πŸŽ€

  • dpy β€” the connection to the X server. your lil phone line to the display, basically πŸ“ž
  • ctx β€” a GLX rendering context. the main character we're interrogating πŸ‘‘
  • attribute β€” the visual ID that the context was created with.
  • value β€” the X screen that the context was created for.
  • _param5 β€” the context with which this context shares display lists, or NULL if this context does not share display lists. yes bestie, that's literally the parameter name in the docs. we move on 🫢

πŸ’– DESCRIPTION πŸ’–

glXQueryContextInfoEXT returns the visual id, the screen number, and the share list of ctx. that's the whole vibe check on your context 🧚

heads up bestie: this call may cause a round trip to the server. so like, it's not free, okurrr? use it with intention πŸ’€

glXQueryContextInfoEXT is part of the EXT_import_context extension β€” it is not part of the core GLX command set. so if you go looking for it in core GLX and it's not there, that's why, don't panic 😭

if GLX_EXT_import_context shows up in the string returned by glXQueryExtensionsString β€” and you call that with the argument GLX_EXTENSIONS β€” then the EXT_import_context extension is supported. that's your confirmation bestie, that's the receipts 🧾✨


πŸ”₯ ERRORS πŸ”₯

  • GLXBadContext gets generated if ctx does not refer to a valid context.

so if you hand it a context that isn't a real context, it's gonna be like "girl what" and throw that at you. feed it a valid one, fr fr πŸ’…


🌈 SEE ALSO 🌈

  • glXCreateContext
  • glXQueryVersion
  • glXQueryExtensionsString

and that's the whole page, bestie 🫢 this was GLXQUERYCONTEXTINFOEXT in section 3G of the manual β€” the same name up top and down at the bottom, because it's giving symmetry, it's giving consistency, it's giving main character energy πŸ‘‘πŸ’– go query some context, you absolute icon ⭐

πŸ“¦ where this page comes from