GLGENSAMPLERS(3G)
β¨ NAME β¨
glGenSamplers β generate sampler object names. And yes bestie, you clocked it: this is the GLGENSAMPLERS(3G) manual page, and we're gonna get through it together π
β¨
π» C SPECIFICATION π»
void glGenSamplers(GLsizei n, GLuint *samplers);
π PARAMETERS π
nβ the number of sampler object names you want to generate. Simple as that, no cap π«Άsamplersβ the array where the generated sampler object names get stored. Basically the lil basket you're putting the names into π§Ίβ¨
πΈ DESCRIPTION πΈ
Okay so glGenSamplers returns n sampler object names in samplers. And listen β there is no guarantee that those names form a contiguous set of integers. Like, they don't have to be all cute and sequential. However, it is guaranteed that none of the returned names was in use immediately before the call to glGenSamplers β so no accidental recycling of a name that was already taken, periodt π₯
Sampler object names returned by a call to glGenSamplers are not returned by subsequent calls, unless they are first deleted with glDeleteSamplers(). So if you want a name back in the pool, you gotta delete it first, bestie ποΈβ¨
The names returned in samplers are marked as used, for the purposes of glGenSamplers only, but they acquire state and type only when they are first bound. So they're like reserved seats at the function, not fully main-character yet ππͺπ«
π NOTES π
glGenSamplers is available only if the GL version is 3.3 or higher. Older GL? Not invited to this party, sorry bestie ππ
π ERRORS π
GL_INVALID_VALUE is generated if n is negative. So yeah, don't pass a negative number unless you're actively trying to summon an error πβ¨
π VERSION SUPPORT π
The support table is giving very "who's invited to the OpenGL version party" energy. Here's the invite list, preserved in full π
- OpenGL Version columns:
2.0,2.1,3.0,3.1,3.2,3.3,4.0,4.1,4.2,4.3,4.4,4.5 - Function / Feature Name:
glGenSamplers2.0:-2.1:-3.0:-3.1:-3.2:β3.3:β4.0:β4.1:β4.2:β4.3:β4.4:β4.5:β
π¦ SEE ALSO π¦
Go bother glBindSampler(), glIsSampler(), and glDeleteSamplers() β they're all in the group chat together π«Άπ¬
π 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 π
Copyright Β© 2010-2014 Khronos Group.
Sign-off time, bestie: the source/version tag is [FIXME: source], the date is 08/09/2021, and the manual is GLGENSAMPLERS(3G) β bye and drink some water ππ
β¨
π¦ 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