GLGETSAMPLERPARAMETE(3G)
π GLGETSAMPLERPARAMETE(3G) β the OpenGL manual, section 3G, bestie
okay so real talk: GLGETSAMPLERPARAMETE(3G) is the manual page for glGetSamplerParameter, and it's literally the "hey what did I set this sampler to again?" function. let's get into it β¨
β¨ NAME β¨
glGetSamplerParameter β return sampler parameter values π
π«Ά C SPECIFICATION π«Ά
void glGetSamplerParameterfv(GLuint sampler, GLenum pname,
GLfloat * params);
void glGetSamplerParameteriv(GLuint sampler, GLenum pname,
GLint * params);
void glGetSamplerParameterIiv(GLuint sampler, GLenum pname,
GLint * params);
void glGetSamplerParameterIuiv(GLuint sampler, GLenum pname,
GLuint * params);
like, pick your flavor: f for floats, i for ints, Ii for signed-integer-pretending-to-be-float vibes, Iui for the unsigned girlies. π
π PARAMETERS π
samplerβ the name of the sampler object you're pulling the parameters out of. like, which sampler bestie are we interrogating rn πpnameβ the symbolic name of the sampler parameter you want. accepted values areGL_TEXTURE_MAG_FILTER,GL_TEXTURE_MIN_FILTER,GL_TEXTURE_MIN_LOD,GL_TEXTURE_MAX_LOD,GL_TEXTURE_LOD_BIAS,GL_TEXTURE_WRAP_S,GL_TEXTURE_WRAP_T,GL_TEXTURE_WRAP_R,GL_TEXTURE_BORDER_COLOR,GL_TEXTURE_COMPARE_MODE, andGL_TEXTURE_COMPARE_FUNC. that's the whole menu, no substitutions πparamsβ where the returned sampler parameters go. it's giving output buffer, main character energy β¨
πΈ DESCRIPTION πΈ
glGetSamplerParameter returns, in params, the value or values of the sampler parameter you named as pname. sampler is the target sampler and it must be the name of an existing sampler object β specifically one returned from a previous call to glGenSamplers(). no inventing sampler names, that's not the vibe π
pname accepts the exact same symbols as glSamplerParameter(), with the exact same interpretations:
GL_TEXTURE_MAG_FILTER β returns the single-valued texture magnification filter, a symbolic constant. the initial value is GL_LINEAR.
GL_TEXTURE_MIN_FILTER β returns the single-valued texture minification filter, a symbolic constant. the initial value is GL_NEAREST_MIPMAP_LINEAR.
GL_TEXTURE_MIN_LOD β returns the single-valued texture minimum level-of-detail value. the initial value is -1000.
GL_TEXTURE_MAX_LOD β returns the single-valued texture maximum level-of-detail value. the initial value is 1000.
GL_TEXTURE_WRAP_S β returns the single-valued wrapping function for texture coordinate s, a symbolic constant. the initial value is GL_REPEAT.
GL_TEXTURE_WRAP_T β returns the single-valued wrapping function for texture coordinate t, a symbolic constant. the initial value is GL_REPEAT.
GL_TEXTURE_WRAP_R β returns the single-valued wrapping function for texture coordinate r, a symbolic constant. the initial value is GL_REPEAT.
GL_TEXTURE_BORDER_COLOR β returns four integer or floating-point numbers that comprise the RGBA color of the texture border. floating-point values come back in the range 0 to 1. integer values come back as a linear mapping of the internal floating-point representation, such that 1.0 maps to the most positive representable integer and -1.0 maps to the most negative representable integer. the initial value is (0, 0, 0, 0).
GL_TEXTURE_COMPARE_MODE β returns a single-valued texture comparison mode, a symbolic constant. the initial value is GL_NONE. see glSamplerParameter().
GL_TEXTURE_COMPARE_FUNC β returns a single-valued texture comparison function, a symbolic constant. the initial value is GL_LEQUAL. see glSamplerParameter().
π¦ NOTES π¦
- if an error is generated, no change is made to the contents of
params. so like, don't go reading your buffer expecting fresh data if it errored, that's on you π glGetSamplerParameteris available only if the GL version is 3.3 or higher. lowkey rude to the old-school girlies but okay π
π ERRORS π
GL_INVALID_VALUEis generated ifsampleris not the name of a sampler object returned from a previous call toglGenSamplers(). (fake sampler name detected, blocked π«)GL_INVALID_ENUMis generated ifpnameis not an accepted value. (not on the list, not getting in β)
π VERSION SUPPORT π
the original ships this as a big table, and since we're not doing tables here, lemme translate the whole thing for you β every OpenGL version is accounted for, no cap:
Columns, left to right: 2.0, 2.1, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5.
glGetSamplerParameterIivβ2.0: -,2.1: -,3.0: -,3.1: -,3.2: β,3.3: β,4.0: β,4.1: β,4.2: β,4.3: β,4.4: β,4.5: βglGetSamplerParameterIuivβ2.0: -,2.1: -,3.0: -,3.1: -,3.2: β,3.3: β,4.0: β,4.1: β,4.2: β,4.3: β,4.4: β,4.5: βglGetSamplerParameterfvβ2.0: -,2.1: -,3.0: -,3.1: -,3.2: β,3.3: β,4.0: β,4.1: β,4.2: β,4.3: β,4.4: β,4.5: βglGetSamplerParameterivβ2.0: -,2.1: -,3.0: -,3.1: -,3.2: β,3.3: β,4.0: β,4.1: β,4.2: β,4.3: β,4.4: β,4.5: β
like, all four showed up at 3.2 together and never left. iconic synchronized entrance π
π§ SEE ALSO π§
glSamplerParameter()glGenSamplers()glDeleteSamplers()glSamplerParameter()
(yes, glSamplerParameter() is listed twice in the original. i'm not fixing it, i'm just reporting it. that's her brand π)
π 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, mwah π β sign-off time: the source field says [FIXME: source] (still unfilled, we love an unfinished metadata moment π« ) and the date on this beauty is 08/09/2021. go forth and query your samplers, 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