GLGETTEXPARAMETER(3G)

πŸ“¦ version 24.3.3, in opensuse-leap 16.0

πŸ’… GLGETTEXPARAMETER (3G) β€” the one where you ask a texture how it's doing

okay so bestie, welcome to the 3G manual page for glGetTexParameterfv and glGetTexParameteriv πŸŽ€ this is the getter half of the texture-parameter duo β€” glTexParameter sets stuff, this one reads it back, no cap.


✨ NAME ✨

glGetTexParameterfv, glGetTexParameteriv β€” return texture parameter values. yeah that's it, they just hand you the values back like a good friend holding your iced coffee 🫢


πŸ’» C SPECIFICATION πŸ’»

void glGetTexParameterfv( GLenum target,
                          GLenum pname,
                          GLfloat *params )
void glGetTexParameteriv( GLenum target,
                          GLenum pname,
                          GLint *params )

🌸 PARAMETERS 🌸

  • target β€” the symbolic name of the target texture. GL_TEXTURE_1D, GL_TEXTURE_2D, and GL_TEXTURE_3D are accepted. that's the whole guest list, no plus-ones πŸ’…
  • pname β€” the symbolic name of a texture parameter. the accepted ones are GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MIN_LOD, GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_TEXTURE_WRAP_R, GL_TEXTURE_BORDER_COLOR, GL_TEXTURE_PRIORITY, and GL_TEXTURE_RESIDENT. yes, all of them. count them. i'll wait πŸ“
  • params β€” returns the texture parameters. this is where the answer goes, so like… give it somewhere to live ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

glGetTexParameter returns in params the value or values of the texture parameter specified as pname. target defines the target texture, either GL_TEXTURE_1D, GL_TEXTURE_2D, or GL_TEXTURE_3D to specify one-, two-, or three-dimensional texturing. and here's the key bit β€” pname accepts the same symbols as glTexParameter, with the same interpretations. same menu, you're just ordering to-go this time 😌

  • GL_TEXTURE_MAG_FILTER β€” returns the single-valued texture magnification filter, a symbolic constant. the initial value is GL_LINEAR. iconic default, honestly πŸ’–
  • GL_TEXTURE_MIN_FILTER β€” returns the single-valued texture minification filter, a symbolic constant. the initial value is GL_NEAREST_MIPMAP_LINEAR. mipmaps from day one, we love to see it 🌈
  • GL_TEXTURE_MIN_LOD β€” returns the single-valued texture minimum level-of-detail value. the initial value is βˆ’1000. yes, minus one thousand, it's giving "no limits" πŸ¦‹
  • GL_TEXTURE_MAX_LOD β€” returns the single-valued texture maximum level-of-detail value. the initial value is 1000.
  • GL_TEXTURE_BASE_LEVEL β€” returns the single-valued base texture mipmap level. the initial value is 0. the ground floor fr fr πŸŽ€
  • GL_TEXTURE_MAX_LEVEL β€” returns the single-valued maximum texture mipmap array level. 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. it goes around, it comes back around πŸ’«
  • 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. third axis, same vibe 🧚
  • GL_TEXTURE_BORDER_COLOR β€” returns four integer or floating-point numbers that comprise the RGBA color of the texture border. floating-point values are returned in the range [0, 1]. integer values are returned 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). transparent border, main character energy πŸ™ˆ
  • GL_TEXTURE_PRIORITY β€” returns the residence priority of the target texture (or the named texture bound to it). the initial value is 1. see glPrioritizeTextures. like a VIP list but for texture memory πŸ‘‘
  • GL_TEXTURE_RESIDENT β€” returns the residence status of the target texture. if the value returned in params is GL_TRUE, the texture is resident in texture memory. see glAreTexturesResident. it's the "are you even here rn" check πŸ’€

⚠️ NOTES ⚠️

  • GL_TEXTURE_PRIORITY and GL_TEXTURE_RESIDENT are available only if the GL version is 1.1 or greater.
  • GL_TEXTURE_3D, GL_TEXTURE_MIN_LOD, GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_MAX_LEVEL, and GL_TEXTURE_WRAP_R are available only if the GL version is 1.2 or greater. so like… check your version first bestie, don't embarrass yourself πŸ™ˆ
okay listen: if an error is generated, no change is made to the contents of params. nothing. zero. the vibes stay untouched πŸ’…

πŸ’€ ERRORS πŸ’€

  • GL_INVALID_ENUM is generated if target or pname is not an accepted value. wrong name, wrong party, no entry πŸ”₯
  • GL_INVALID_OPERATION is generated if glGetTexParameter is executed between the execution of glBegin and the corresponding execution of glEnd. so do NOT slide into a glBegin/glEnd block with this, that's the forbidden zone 😭

🌟 SEE ALSO 🌟

  • glAreTexturesResident(3G)
  • glPrioritizeTextures(3G)
  • glTexParameter(3G)

the squad, the whole squad, periodt 🫢


alright that's the page πŸ’– this was the GLGETTEXPARAMETER(3G) page β€” that (3G) at the bottom is literally just the same name stamped again as the footer, no version number or date attached, so like… imagine a cute little signature line that only says its own name. humble. iconic. we stan. ⭐

go read your texture params, bestie, you're gonna slay βœ¨πŸ’…πŸŽ€

πŸ“¦ where this page comes from