GLGETPOINTERV(3G)

πŸ’– GLGETPOINTERV(3G) πŸ’–

okay so bestie, this is a page from the [FIXME: manual] manual, and it's literally all about one lil' function that hands you back a pointer. no cap, that's the whole vibe. let's get into it ✨


🌸 NAME 🌸

glGetPointerv β€” return the address of the specified pointer 🫢


πŸŽ€ C SPECIFICATION πŸŽ€

void glGetPointerv(GLenum pname, GLvoid ** params);

that's it. that's the signature. copy it exactly, don't @ me πŸ’…


πŸ¦‹ PARAMETERS πŸ¦‹

  • pname β€” tells the function which pointer you want back. ngl it has to be one of exactly two things: GL_DEBUG_CALLBACK_FUNCTION or GL_DEBUG_CALLBACK_USER_PARAM. that's the whole guest list, no plus-ones 🚫
  • params β€” this is where the pointer value specified by pname gets returned. like, it's the lil' drop-off spot for the data πŸ“¦

✨ DESCRIPTION ✨

so glGetPointerv returns pointer information. pname indicates the pointer to be returned, and params is a pointer to a location in which to place the returned data. iconic, honestly.

the parameters that may be queried include:

  • GL_DEBUG_CALLBACK_FUNCTION β€” returns the current callback function set with the callback argument of glDebugMessageCallback().
  • GL_DEBUG_CALLBACK_USER_PARAM β€” returns the user parameter to the current callback function set with the userParam argument of glDebugMessageCallback().

that's the tea β˜• two queries, both debug-callback flavored, both lowkey essential if you're doing debug message stuff πŸ›


πŸ’€ NOTES πŸ’€

important vibe check: glGetPointerv is available in the OpenGL core profile only if the GL version is 4.3 or later.

it is available in the compatibility profile for all GL versions, and there it accepts additional queries. but β€” and this is the part where you go "not me finding out like this" β€” these reference pages document only the core profile. so if you're looking for the compatibility extras, they are not here, bestie 😭


πŸ™ˆ ERRORS πŸ™ˆ

  • GL_INVALID_ENUM is generated if pname is not an accepted value. like, if you pass something random, it will absolutely let you know πŸ’€

πŸ‘‘ VERSION SUPPORT πŸ‘‘

so the original is a whole big table (the columns are the OpenGL Version, and the row is the Function / Feature Name), and we're gonna say it in words instead because tables in a group chat are a crime βœ‹

the columns in that table are, in order: 2.0, 2.1, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5. 🌈

and the row glGetPointerv looks like this:

  • 2.0 β€” - (nope)
  • 2.1 β€” - (nope)
  • 3.0 β€” - (nope)
  • 3.1 β€” - (nope)
  • 3.2 β€” - (nope)
  • 3.3 β€” - (nope)
  • 4.0 β€” - (nope)
  • 4.1 β€” - (nope)
  • 4.2 β€” - (nope)
  • 4.3 β€” βœ” (slay ✨)
  • 4.4 β€” βœ” (slay ✨)
  • 4.5 β€” βœ” (slay ✨)

so basically: nothing until 4.3, then it's all green lights. she's a late bloomer and we respect that πŸ“


πŸ”₯ SEE ALSO πŸ”₯

  • glDebugMessageCallback() β€” go read it, it's the whole reason these two pname values exist 🫢

Copyright Β© 2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

Copyright Β© 2014 Khronos Group

(yes, that's the copyright section twice, back to back, and that's exactly how the original rolls β€” no erasure here πŸ‘‘)


and that's the whole page!! tysm for reading, bestie πŸ’– this one came from [FIXME: source], dated 08/09/2021, and it's page GLGETPOINTERV(3G) of the manual β€” mwah 😘 πŸŽ€βœ¨

πŸ“¦ where this page comes from