GL_PATCHVERTICESIN(3G)
π GL_PATCHVERTICESIN β the 3G manual page, but make it make sense
okay so this is a page from the 3G manual section (the header literally says GL_PATCHVERTICESIN(3G), and it's tagged [FIXME: manual] up top, which is giving "work in progress but make it fashion" π). Anyway, this is about one specific built-in shader variable, and honestly? she's niche but she's iconic. let's get into it.
β¨ NAME β¨
gl_PatchVerticesIn β she holds the number of vertices in the current patch. that's it, that's the whole job, and she does it flawlessly π
πΈ DECLARATION πΈ
in int gl_PatchVerticesIn ;
like yes she's an in int, no you cannot write to her, mind your business bestie π
side note: in the original page this line is literally glued to the next heading β.SH "DESCRIPTION"is stuck right on the end with no space,gl_PatchVerticesIn ;.SH "DESCRIPTION"π not me noticing the formatting crimes. we keep the facts, we fix the vibes.
π¦ DESCRIPTION π¦
so. she's only available in the tessellation control and tessellation evaluation languages β if you're not in a tess shader, she's not in the group chat, periodt.
inside those shaders, gl_PatchVerticesIn contains the number of vertices in the input being processed by the shader.
and here's the lowkey important part: a single tessellation control shader or tessellation evaluation shader can read patches of differing sizes. so the value of gl_PatchVerticesIn may differ between patches. do not assume it's a constant for the whole draw call, bestie, because she said what she said π₯
(also, fair warning: the original text spells it gl_PatchVertexIn in that last sentence β no s before In. that's a typo in the manpage itself, we're preserving it here for accuracy, don't come for me π)
π VERSION SUPPORT π
the original page ships this as a big fancy boxed table. tables don't render here, so here it is as a list instead β exact same info, exact same β and β marks, no cap. the columns were the OpenGL Shading Language Version, and the row is the variable gl_PatchVerticesIn:
1.10β β (marked-)1.20β β (marked-)1.30β β (marked-)1.40β β (marked-)1.50β β (marked-)3.30β β (marked-)4.00β β supported4.10β β supported4.20β β supported4.30β β supported4.40β β supported4.50β β supported
so she showed up in 4.00 and never left. glow up at 4.00, still booked and busy at 4.50. the way that consistencyβ¦ we love to see it π
π SEE ALSO π
go read her friends, they're all in the tessellation friend group and they're all icons:
gl_TessLevelOuter()gl_TessLevelInner()gl_TessCoord()
π COPYRIGHT π
Copyright Β© 2011-2014 Khronos Group.
and the full legal bit, verbatim energy: this material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999, at http://opencontent.org/openpub/.
then the page repeats the copyright line one more time, because apparently once wasn't enough:
Copyright Β© 2011-2014 Khronos Group
(the original really does have two separate COPYRIGHT sections, back to back. iconic behavior honestly π)
and that's the page!! mwah π«Ά
ok final sign-off: the footer down at the bottom was[FIXME: source]and the date 08/09/2021 β so yes, this documentation was last touched on 08/09/2021, source still aFIXME, and the manpage name on both ends isGL_PATCHVERTICESIN(3G). she's a little unfinished and we love her for it. go tessellate something cute. bye bestie πβ¨π
π¦ 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