GLGETSTRING(3G)

okay so bestie, welcome to the 3G manual page for glGetString β€” the source header is marked [FIXME: manual], and we are keeping that little detail, no cap. This is the whole β€œtell me about the current GL connection” situation, and it eats. πŸ’…


✨ NAME ✨

glGetString β€” return a string describing the current GL connection. That’s the vibe. 🫢


πŸ’» C SPECIFICATION πŸ’»

const GLubyte *glGetString(GLenum name);

const GLubyte *glGetStringi(GLenum name, GLuint index);

πŸŽ€ PARAMETERS πŸŽ€

  • name β€” specifies a symbolic constant, one of GL_VENDOR, GL_RENDERER, GL_VERSION, or GL_SHADING_LANGUAGE_VERSION. Additionally, glGetStringi accepts the GL_EXTENSIONS token.
  • index β€” for glGetStringi, specifies the index of the string to return.

πŸ¦‹ DESCRIPTION πŸ¦‹

glGetString returns a pointer to a static string describing some aspect of the current GL connection. The name can be one of these iconic options:

  • GL_VENDOR β€” returns the company responsible for this GL implementation. This name does not change from release to release.
  • GL_RENDERER β€” returns the name of the renderer. This name is typically specific to a particular configuration of a hardware platform. It does not change from release to release.
  • GL_VERSION β€” returns a version or release number.
  • GL_SHADING_LANGUAGE_VERSION β€” returns a version or release number for the shading language.

glGetStringi returns a pointer to a static string indexed by index. The name can be one of these:

  • GL_EXTENSIONS β€” for glGetStringi only, returns the extension string supported by the implementation at index.

Strings GL_VENDOR and GL_RENDERER together uniquely specify a platform. They do not change from release to release and should be used by platform-recognition algorithms. πŸ‘‘

The GL_VERSION and GL_SHADING_LANGUAGE_VERSION strings begin with a version number. The version number uses one of these forms:

major_number.minor_number major_number.minor_number.release_number

Vendor-specific information may follow the version number. Its format depends on the implementation, but a space always separates the version number and the vendor-specific information.

All strings are null-terminated. periodt. πŸ’–


🌸 NOTES 🌸

If an error is generated, glGetString returns 0.

The client and server may support different versions. glGetString always returns a compatible version number. The release number always describes the server.


🚨 ERRORS 🚨

  • GL_INVALID_ENUM is generated if name is not an accepted value.
  • GL_INVALID_VALUE is generated by glGetStringi if index is outside the valid range for indexed state name.
bestie, if you see these, it’s giving β€œnot the accepted value” energy 😭

🌈 VERSION SUPPORT 🌈

The source table has columns Function / Feature Name and OpenGL Version, and here’s every single value kept in bullet form because tables are not the vibe here but the facts absolutely are:

  • glGetString β€” 2.0 βœ”, 2.1 βœ”, 3.0 βœ”, 3.1 βœ”, 3.2 βœ”, 3.3 βœ”, 4.0 βœ”, 4.1 βœ”, 4.2 βœ”, 4.3 βœ”, 4.4 βœ”, 4.5 βœ”
  • glGetStringi β€” 2.0 -, 2.1 -, 3.0 βœ”, 3.1 βœ”, 3.2 βœ”, 3.3 βœ”, 4.0 βœ”, 4.1 βœ”, 4.2 βœ”, 4.3 βœ”, 4.4 βœ”, 4.5 βœ”

πŸ¦‹ SEE ALSO πŸ¦‹

so this section is literally empty in the source β€” no entries to list, just vibes. 🫢


Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.


yes, the source has this section twice, and we are keeping both, because every detail matters:

Copyright Β© 1991-2006 Silicon Graphics, Inc.

Copyright Β© 2010-2014 Khronos Group


mwah πŸ’‹ this iconic page is stamped [FIXME: source], dated 08/09/2021, and filed under GLGETSTRING(3G) β€” slay and goodbye. πŸŽ€

πŸ“¦ where this page comes from