GLGETQUERYINDEXEDIV(3G)
GLGETQUERYINDEXEDIV(3G) π
okay bestie, so this is a 3G manual page, which means it's all about OpenGL and we're literally about to get into the indexed query object tea. no cap, this function is giving serious main character energy for anyone who needs to peek at what their GPU is doing under the hood. let's get into it. β¨
C SPECIFICATION π
like, here's the exact signature, copy it character for character or it won't compile, iykyk:
void glGetQueryIndexediv(GLenum target, GLuint index, GLenum pname,
GLint *params);
PARAMETERS πΈ
targetβ this is the specific query object target you're obsessed with. it must be one of:GL_SAMPLES_PASSED,GL_ANY_SAMPLES_PASSED,GL_ANY_SAMPLES_PASSED_CONSERVATIVE,GL_PRIMITIVES_GENERATED,GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN,GL_TIME_ELAPSED, orGL_TIMESTAMP. no random values, bestie, the driver will literally not have it.indexβ the index of the query object target. like, which one in the stack you're asking about.pnameβ the symbolic name of a query object target parameter. the accepted values areGL_CURRENT_QUERYorGL_QUERY_COUNTER_BITS. that's it. don't try anything else.paramsβ this is where the requested data gets returned. it's a pointer, so it's gonna write the answer right into your variable. periodt.
DESCRIPTION π¦
okay so glGetQueryIndexediv returns, in params, a selected parameter of the indexed query object target specified by target and index. the index specifies the index of the query object target and must be between zero and a target-specific maximum. (yes, "maxiumum" is a typo in the original, and no, i'm not fixing it β that's not my job, i just work here. π)
pname is the name of a specific query object target parameter. so when pname is GL_CURRENT_QUERY, the name of the currently active query for the specified index of target β or zero if no query is active β will be placed in params. and if 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. slay. π₯
NOTES π
- the target
GL_ANY_SAMPLES_PASSED_CONSERVATIVEis available only if the GL version is4.3or greater. no 4.2-and-below shenanigans, bestie. - if an error is generated, no change is made to the contents of
params. so like, don't go reading stale data and blaming me, okay? - calling
glGetQueryiv()is equivalent to callingglGetQueryIndexedivwithindexset to zero. literally the same vibe, just a shortcut.
ERRORS π
GL_INVALID_ENUMis generated iftargetorpnameis not an accepted value. so like, read the parameter list again, bestie.GL_INVALID_VALUEis generated ifindexis greater than or equal to the target-specific maximum. don't go out of bounds, that's not the move.
VERSION SUPPORT π
here's the vibe check on which OpenGL versions are down for this function. the original was a whole table, so i'm giving you the facts in list form β glGetQueryIndexediv is supported from OpenGL 4.0 onward, and not supported in 2.0, 2.1, 3.0, 3.1, 3.2, or 3.3:
- OpenGL
2.0β-(nah) - OpenGL
2.1β-(nah) - OpenGL
3.0β-(nah) - OpenGL
3.1β-(nah) - OpenGL
3.2β-(nah) - OpenGL
3.3β-(nah) - OpenGL
4.0ββ(yes bestie) - OpenGL
4.1ββ(yes bestie) - OpenGL
4.2ββ(yes bestie) - OpenGL
4.3ββ(yes bestie) - OpenGL
4.4ββ(yes bestie) - OpenGL
4.5ββ(yes bestie)
SEE ALSO π«Ά
go check out these other icons when you're done here:
glGetQueryObject()glIsQuery()
COPYRIGHT β
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 Β© 2010-2014 Khronos Group.
okay so that's the whole page, bestie. π no gatekeeping here β every flag, every enum, every error, and every copyright line is exactly where it should be. this page came from the [FIXME: source] and was dated 08/09/2021, and the header says GLGETQUERYINDEXEDIV(3G) with a [FIXME: manual] vibe. go forth and query those indexed targets. you're gonna slay. ππ
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms