GLGENERATEMIPMAP(3G)
okay so welcome to GLGENERATEMIPMAP(3G), bestie β the manual page where we make mipmaps pop off β¨π
NAME
glGenerateMipmap, glGenerateTextureMipmap β generate mipmaps for a specified texture object π
C SPECIFICATION
void glGenerateMipmap(GLenum target);
void glGenerateTextureMipmap(GLuint texture);
PARAMETERS
targetβ specifies the target to which the texture object is bound forglGenerateMipmap. It must be one ofGL_TEXTURE_1D,GL_TEXTURE_2D,GL_TEXTURE_3D,GL_TEXTURE_1D_ARRAY,GL_TEXTURE_2D_ARRAY,GL_TEXTURE_CUBE_MAP, orGL_TEXTURE_CUBE_MAP_ARRAY. no random targets allowed, queen πtextureβ specifies the texture object name forglGenerateTextureMipmap. π¦
DESCRIPTION
So glGenerateMipmap and glGenerateTextureMipmap generate mipmaps for the specified texture object. For glGenerateMipmap, thatβs the texture object bound to target. For glGenerateTextureMipmap, texture is the name of the texture object. literally that simple, bestie π
For cube map and cube map array textures, the texture object must be cube complete or cube array complete respectively. vibe check: complete only, no half-finished cube energy π
Mipmap generation replaces texel image levels $level_{base} + 1$ through $q$ with images derived from the $level_{base}$ image, regardless of their previous contents. All other mimap images, including the $level_{base}+1$ image, are left unchanged by this computation. the way this computation just ignores previous contents is so main character π
The internal formats of the derived mipmap images all match those of the $level_{base}$ image. The contents of the derived images are computed by repeated, filtered reduction of the $level_{base} + 1$ image. For one- and two-dimensional array and cube map array textures, each layer is filtered independently. independent layers = independent little icons, periodt β¨
NOTES
Cube map array textures are accepted only if the GL version is 4.0 or higher. so if youβre on baby GL, cube map arrays are not invited to the function π
ERRORS
GL_INVALID_ENUMis generated byglGenerateMipmapiftargetis not one of the accepted texture targets. wrong target = invalid enum, bestie π¨GL_INVALID_OPERATIONis generated byglGenerateTextureMipmapiftextureis not the name of an existing texture object. no fake texture names in this group chat πGL_INVALID_OPERATIONis generated iftargetisGL_TEXTURE_CUBE_MAPorGL_TEXTURE_CUBE_MAP_ARRAY, and the specified texture object is not cube complete or cube array complete, respectively. incomplete cube = invalid operation, and thatβs on periodt π
VERSION SUPPORT
The version-support table is giving Function / Feature Name vs OpenGL Version, and the columns are 2.0, 2.1, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5. π
glGenerateMipmapβ2.0:-;2.1:-;3.0: β;3.1: β;3.2: β;3.3: β;4.0: β;4.1: β;4.2: β;4.3: β;4.4: β;4.5: β. she ate from 3.0 onward π₯glGenerateTextureMipmapβ2.0:-;2.1:-;3.0:-;3.1:-;3.2:-;3.3:-;4.0:-;4.1:-;4.2:-;4.3:-;4.4:-;4.5: β. only 4.5 gets the checkmark, iconic late bloomer behavior π
SEE ALSO
glTexImage2D(), glBindTexture(), glGenTextures() π«Ά
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 π
okay thatβs the whole page, bestie π source/version: [FIXME: source] β’ date: 08/09/2021 β’ page: GLGENERATEMIPMAP(3G) β slay and goodbye β¨π
π¦ 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