GLPATCHPARAMETER(3G)
π GLPATCHPARAMETER β glPatchParameter π
okay bestie, so this is a 3G manpage (that's the GL one, iykyk) and it's literally all about telling OpenGL how your patch primitives should behave. tessellation girlies rise π¦
β¨ C SPECIFICATION β¨
void glPatchParameteri(GLenum pname, GLint value);
void glPatchParameterfv(GLenum pname, const GLfloat *values);
π PARAMETERS π
pnameβ the name of the parameter you're setting, bestie. it has to be one of these symbolic constants:GL_PATCH_VERTICES,GL_PATCH_DEFAULT_OUTER_LEVEL, orGL_PATCH_DEFAULT_INNER_LEVEL.valueβ the shiny new value for whateverpnameyou picked. πvaluesβ the address of an array holding the new values for the parameter named bypname. yes, address of an array, not the array itself, she's β¨fancyβ¨
πΈ DESCRIPTION πΈ
glPatchParameter sets the parameters that get used for patch primitives. pname says which one you're modifying and it must be either GL_PATCH_VERTICES, GL_PATCH_DEFAULT_OUTER_LEVEL, or GL_PATCH_DEFAULT_INNER_LEVEL. for glPatchParameteri, value is the new value for the parameter in pname. for glPatchParameterfv, values is the address of an array carrying the new values for the parameter in pname.
when pname is GL_PATCH_VERTICES, value says how many vertices go into making up a single patch primitive. patch primitives get eaten by the tessellation control shader (if there is one) and then used for tessellation. when primitives are specified with glDrawArrays() or a similar function, each patch is made from parameter control points, each one represented by a vertex taken from the enabled vertex arrays. parameter has to be greater than zero, and less than or equal to the value of GL_MAX_PATCH_VERTICES. no cap? actually there IS a cap, sorry babe π
when pname is GL_PATCH_DEFAULT_OUTER_LEVEL or GL_PATCH_DEFAULT_INNER_LEVEL, values holds the address of an array containing the default outer or inner tessellation levels (respectively) to be used when there's no tessellation control shader present. main character fallback behaviour honestly π
π₯ ERRORS π₯
GL_INVALID_ENUMβ thrown whenpnameisn't one of the accepted values. wrong name, wrong vibe, denied.GL_INVALID_VALUEβ thrown whenpnameisGL_PATCH_VERTICESandvalueis less than or equal to zero, or greater than the value ofGL_MAX_PATCH_VERTICES. (yes, both bounds. she checks both. π)
π VERSION SUPPORT π
so the original page ships a whole grid for this β I can't do tables in here so here's the tea in list form, same numbers, same ticks, no cap:
glPatchParameterfvβ OpenGL 2.0:-, 2.1:-, 3.0:-, 3.1:-, 3.2:-, 3.3:-, then 4.0:β, 4.1:β, 4.2:β, 4.3:β, 4.4:β, 4.5:βglPatchParameteriβ OpenGL 2.0:-, 2.1:-, 3.0:-, 3.1:-, 3.2:-, 3.3:-, then 4.0:β, 4.1:β, 4.2:β, 4.3:β, 4.4:β, 4.5:β
so like... 4.0 and up only, both of them. thx for coming to my TED talk π«Ά
β SEE ALSO β
go read these next, they're the friend group:
glDrawArrays()glDrawArraysInstanced()glDrawElements()glDrawRangeElements()
π 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 that's the whole page π
and for the sign-off: this little icon came from [FIXME: source] and it's dated 08/09/2021 β so go forth and tessellate, bestie. slay, periodt, and may your GL_MAX_PATCH_VERTICES never betray you πβ¨π
π¦ 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