GLGETQUERYIV(3G)

✨ NAME ✨

glGetQueryiv β€” returns parameters of a query object target. That's the whole assignment, bestie, and we're gonna slay it. This page is GLGETQUERYIV(3G), living in the [FIXME: manual] manual slot like the iconic placeholder it is. πŸ’…

πŸ’» C SPECIFICATION πŸ’»

void glGetQueryiv(GLenum target, GLenum pname, GLint * params);

No cap, that's the whole signature. ✨

πŸŽ€ PARAMETERS πŸŽ€

  • target β€” specifies a query object target. Must be GL_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED_CONSERVATIVE, GL_PRIMITIVES_GENERATED, GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, GL_TIME_ELAPSED, or GL_TIMESTAMP.
  • pname β€” specifies the symbolic name of a query object target parameter. Accepted values are GL_CURRENT_QUERY or GL_QUERY_COUNTER_BITS.
  • params β€” returns the requested data. That's the drop spot. 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so glGetQueryiv returns in params a selected parameter of the query object target specified by target. Literally it's the "tell me about this target" call.

pname names a specific query object target parameter. When pname is GL_CURRENT_QUERY, the name of the currently active query for target β€” or zero if no query is active β€” will be placed in params. When pname is GL_QUERY_COUNTER_BITS, the implementation-dependent number of bits used to hold the result of queries for target is returned in params. Yes, implementation-dependent: the GL gets to decide, and we respect it. πŸ’–

🌸 NOTES 🌸

  • The target GL_ANY_SAMPLES_PASSED_CONSERVATIVE is available only if the GL version is 4.3 or greater. Version check, bestie. 🧚
If an error is generated, no change is made to the contents of params. So params stays untouched β€” no sneaky little edits. πŸ’€

πŸ”₯ ERRORS πŸ”₯

  • GL_INVALID_ENUM is generated if target or pname is not an accepted value. Wrong value? Boom, that error. 😭

πŸ‘‘ VERSION SUPPORT πŸ‘‘

Function / Feature Name: glGetQueryiv. Under "OpenGL Version", every one of these gets a big checkmark βœ”:

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

All of them, periodt. 🌈

⭐ SEE ALSO ⭐

  • glGetQueryObject()
  • glIsQuery()

Copyright Β© 2005 Addison-Wesley. Copyright Β© 2010-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 Β© 2005 Sams Publishing
  • Copyright Β© 2010-2014 Khronos Group

Signing off with footer energy: source/version [FIXME: source], date 08/09/2021, page GLGETQUERYIV(3G). Stay hydrated and keep those params safe. πŸ’…βœ¨

πŸ“¦ where this page comes from