GL_PRIMITIVEIDIN(3G)
π NAME π
Okay bestie, welcome to the GL_PRIMITIVEIDIN(3G) manual page. The main character here is gl_PrimitiveIDIn β it contains the index of the current primitive. Thatβs the whole vibe. π
π§ DECLARATION π§
Hereβs the exact lil signature, no cap:
in int gl_PrimitiveIDIn ;
πΈ DESCRIPTION πΈ
gl_PrimitiveIDIn is a geometry language input variable that holds the number of primitives processed by the shader since the current set of rendering primitives was started. The first primitive processed by the drawing command is numbered zero, and the primitive ID counter is incremented after every individual point, line or triangle primitive is processed.
For triangles drawn in point or line mode, the primitive ID counter is incremented only once, even though multiple points or lines may actually be drawn. And restarting a primitive topology using the primitive restart index has no effect on the primitive ID counter. Periodt.
β¨ VERSION SUPPORT β¨
Support vibe check for the gl_PrimitiveIDIn variable name across OpenGL Shading Language versions:
1.10:-1.20:-1.30:-1.40:-1.50:β3.30:β4.00:β4.10:β4.20:β4.30:β4.40:β4.50:β
π SEE ALSO π
You already know we gotta shout out gl_InstanceID() too. Go peek, bestie. π«Ά
π COPYRIGHT π
Copyright Β© 2011-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 β round two, because the page says it twice π
Copyright Β© 2011-2014 Khronos Group
Bye bestie π β signing off from the [FIXME: source] version, dated 08/09/2021, manual GL_PRIMITIVEIDIN(3G). Stay iconic. β¨
π¦ 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