GLINVALIDATETEXIMAGE(3G)

✨ NAME ✨

glInvalidateTexImage β€” invalidate the entirety a texture image. also hiii bestie, this is the 3G manual page, and the header had a lil [FIXME: manual] placeholder, which is giving β€œwe’ll fix it later” energy. No cap, this whole page is about invalidating a texture image.


🧚 C SPECIFICATION 🧚

void glInvalidateTexImage(GLuint texture, GLint level);

πŸŽ€ PARAMETERS πŸŽ€

  • texture β€” the name of a texture object to invalidate. like, the GLuint name, bestie.
  • level β€” the level of detail of the texture object to invalidate. the level-of-detail number in question.

πŸ’– DESCRIPTION πŸ’–

okay so the page literally says glInvalidateTexSubImage invalidates all of a texture image β€” yes, glInvalidateTexSubImage, right there in the DESCRIPTION of GLINVALIDATETEXIMAGE, and we are not fixing it, we are simply reporting the typo with love. 🫢 texture and level indicated which texture image is being invalidated. After this command, data in the texture image has undefined values. undefined, bestie β€” not zero, not cleared, just undefined, so do not go treating it like a cute lil predictable buffer. 😭

level must be greater than or equal to zero and be less than the base 2 logarithm of the maximum texture width, height, or depth.

For textures of targets GL_TEXTURE_RECTANGLE, GL_TEXTURE_BUFFER, GL_TEXTURE_2D_MULTISAMPLE, or GL_TEXTURE_2D_MULTISAMPLE_ARRAY, level must be zero. periodt.

πŸ’€ ERRORS πŸ’€

the vibe check can fail in three GL_INVALID_VALUE ways:

  • GL_INVALID_VALUE is generated if level is less than zero or if it is greater or equal to the base 2 logarithm of the maximum texture width, height, or depth.
  • GL_INVALID_VALUE is generated if the target of texture is any of GL_TEXTURE_RECTANGLE, GL_TEXTURE_BUFFER, GL_TEXTURE_2D_MULTISAMPLE, or GL_TEXTURE_2D_MULTISAMPLE_ARRAY and level is not zero.
  • GL_INVALID_VALUE is generated if texture is not the name of an existing texture object.

πŸ” ASSOCIATED GETS πŸ”

glGet() with argument GL_MAX_TEXTURE_SIZE β€” that’s the associated get, go get it.

πŸ‘‘ VERSION SUPPORT πŸ‘‘

The table has Function / Feature Name down one side and OpenGL Version across the top, with versions 2.0 through 4.5. Here’s the same tea, listified because tables are not the moment:

  • glInvalidateTexImage on OpenGL 2.0 β€” -
  • glInvalidateTexImage on OpenGL 2.1 β€” -
  • glInvalidateTexImage on OpenGL 3.0 β€” -
  • glInvalidateTexImage on OpenGL 3.1 β€” -
  • glInvalidateTexImage on OpenGL 3.2 β€” -
  • glInvalidateTexImage on OpenGL 3.3 β€” -
  • glInvalidateTexImage on OpenGL 4.0 β€” -
  • glInvalidateTexImage on OpenGL 4.1 β€” -
  • glInvalidateTexImage on OpenGL 4.2 β€” -
  • glInvalidateTexImage on OpenGL 4.3 β€” βœ”
  • glInvalidateTexImage on OpenGL 4.4 β€” βœ”
  • glInvalidateTexImage on OpenGL 4.5 β€” βœ”

πŸ¦‹ SEE ALSO πŸ¦‹

glInvalidateTexSubImage(),, glInvalidateBufferSubData(), glInvalidateBufferData(), glInvalidateFramebuffer(), glInvalidateSubFramebuffer(). (and yes, the double comma after glInvalidateTexSubImage(),, is exactly what the page has β€” leave her alone, she’s iconic 🫢)

Copyright Β© 2013-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 Β© 2013-2014 Khronos Group


byeee bestie, this was GLINVALIDATETEXIMAGE(3G) from [FIXME: source], dated 08/09/2021 β€” go invalidate responsibly and hydrate πŸ’…βœ¨

πŸ“¦ where this page comes from