GLCREATETEXTURES(3G)
π
GLCREATETEXTURES(3G) β aka the 3G girlies' guide to making textures β¨
okay so bestie, gather round π«Ά this one is genuinely iconic β it's glCreateTextures, and it's the function that literally makes texture objects out of thin air. no cap. it lives in the 3G section of the manual, which is giving "OpenGL and friends only" energy, so don't go looking for it in 1 or 8. π
β¨ C SPECIFICATION β¨
here's the exact signature, don't @ me, type it exactly like this:
void glCreateTextures(GLenum target, GLsizei n, GLuint *textures);
π PARAMETERS π
targetβ tells the function what kind of texture each new one should be, i.e. its effective texture target. this is the vibe check for the whole batch πnβ how many texture objects you want. the number. how many. πtexturesβ an array you pass in, and the names of all your shiny new texture objects get stored in it. you bring the bucket, it brings the goods π§
π₯ DESCRIPTION π₯
okay so glCreateTextures hands you back n previously unused texture names in textures. "previously unused" is doing a lot of work there β these are fresh names, never touched before, no cap. each one represents a brand-new texture object, and its dimensionality and type come from whatever you passed as target, and it's initialized to the default values for that texture type. so it's ready to go, just at factory settings π
and target must be one of these, periodt:
GL_TEXTURE_1DGL_TEXTURE_2DGL_TEXTURE_3DGL_TEXTURE_1D_ARRAYGL_TEXTURE_2D_ARRAYGL_TEXTURE_RECTANGLEGL_TEXTURE_CUBE_MAPGL_TEXTURE_CUBE_MAP_ARRAYGL_TEXTURE_BUFFERGL_TEXTURE_2D_MULTISAMPLEGL_TEXTURE_2D_MULTISAMPLE_ARRAY
like, that's the whole list. eleven options. memorize it or keep this page open, iykyk π
π ERRORS π
GL_INVALID_ENUMis generated iftargetis not one of the allowable values. so if you freelanced a target, that's on you bestie πGL_INVALID_VALUEis generated ifnis negative. negative textures are not a thing. the void does not have a texture count. π
π VERSION SUPPORT π
so the original has a whole grid here, and the vibe of the grid is honestly just: this is a 4.5-only situation. here's the tea β
glCreateTexturesβ not supported in OpenGL2.0βglCreateTexturesβ not supported in OpenGL2.1βglCreateTexturesβ not supported in OpenGL3.0βglCreateTexturesβ not supported in OpenGL3.1βglCreateTexturesβ not supported in OpenGL3.2βglCreateTexturesβ not supported in OpenGL3.3βglCreateTexturesβ not supported in OpenGL4.0βglCreateTexturesβ not supported in OpenGL4.1βglCreateTexturesβ not supported in OpenGL4.2βglCreateTexturesβ not supported in OpenGL4.3βglCreateTexturesβ not supported in OpenGL4.4βglCreateTexturesβ supported in OpenGL4.5β
one single checkmark. one. she waited for 4.5 and she ate π₯
πΈ SEE ALSO πΈ
go read these next, they're the friend group π«Ά
glBindTexture()glDeleteTextures()glGenTextures()glGet()glGetTexParameter()glIsTexture()glTexBuffer()glTexImage1D()glTexImage2D()glTexImage2DMultisample()glTexImage3D()glTexImage3DMultisample()glTexParameter()
π COPYRIGHT π
Copyright Β© 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/
and then, yes, the copyright line is literally listed a second time in the original, so here it is again, because we keep every detail in this house β no skipping, no summarising, that's the rule π
Copyright Β© 2014 Khronos Group
and that's the page!! π¦ cute little sign-off for you: the source line on this one literally just says [FIXME: source] (iconic of them honestly), the date is 08/09/2021, and the whole thing is filed under GLCREATETEXTURES(3G). now go make some textures, main character πβ¨
π¦ 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