GLGETPOINTERV(3G)

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

🌸 GLGETPOINTERV (3G) 🌸

okay bestie, so this is the page for glGetPointerv β€” yes, it lives in the 3G manual, the OpenGL one, and it's literally the "hey, where does that pointer actually live?" function. it's giving directory assistance for client-side state. πŸ’…


✨ C SPECIFICATION ✨

void glGetPointerv( GLenum pname,
                    void **params )

that's the whole vibe. two args, no drama.


πŸŽ€ PARAMETERS πŸŽ€

  • pname β€” tells the function which array or buffer pointer you want handed back. the symbolic constants it accepts are GL_COLOR_ARRAY_POINTER, GL_EDGE_FLAG_ARRAY_POINTER, GL_FEEDBACK_BUFFER_POINTER, GL_INDEX_ARRAY_POINTER, GL_NORMAL_ARRAY_POINTER, GL_TEXTURE_COORD_ARRAY_POINTER, GL_SELECTION_BUFFER_POINTER, and GL_VERTEX_ARRAY_POINTER. that's the whole guest list, no plus-ones. 🫢
  • params β€” the spot where the pointer value you asked for by pname gets dropped off.

πŸ’– DESCRIPTION πŸ’–

so glGetPointerv returns pointer info, periodt. pname is a symbolic constant that says which pointer you're asking about, and params is a pointer to a location where the returned data gets placed. it's literally pointer-to-put-a-pointer-in. pointer inception, but make it useful. πŸŒ€

think of it as: you name the thing with pname, and it writes the address into whatever params points at. no cap, that's the entire job.


πŸ¦‹ NOTES πŸ¦‹

heads up bestie, there are some rules πŸ‘‡
  • glGetPointerv is available only if the GL version is 1.1 or greater. older than that and it's simply not invited to the party. 😭
  • the pointers are all client-side state. every single one. no server-side shenanigans.
  • the initial value for each pointer is 0. that's the starting state, fresh out the box. 🌱
  • when the GL_ARB_multitexture extension is supported, querying GL_TEXTURE_COORD_ARRAY_POINTER returns the value for the active client texture unit. so whichever unit is the main character at that moment, that's whose pointer you get. πŸ‘‘

πŸ”₯ ERRORS πŸ”₯

  • GL_INVALID_ENUM is generated if pname is not an accepted value. i.e. if you pass a constant that wasn't on the list above, the GL will absolutely let you know. πŸ’€

🌈 SEE ALSO 🌈

  • glArrayElement(3G)
  • glClientActiveTextureARB(3G)
  • glColorPointer(3G)
  • glDrawArrays(3G)
  • glEdgeFlagPointer(3G)
  • glFeedbackBuffer(3G)
  • glIndexPointer(3G)
  • glInterleavedArrays(3G)
  • glNormalPointer(3G)
  • glSelectBuffer(3G)
  • glTexCoordPointer(3G)
  • glVertexPointer(3G)

like, the entire pointer friend group. go say hi. 🧚


okay that's the tea πŸ“ β€” this page came from the 3G manual set and signs itself off, iconic as ever, as:

GLGETPOINTERV(3G)

mwah πŸ’œ go forth and get those pointers.

πŸ“¦ where this page comes from