GLBINDIMAGETEXTURES(3G)

โœจ NAME โœจ

okay so this is glBindImageTextures from the 3G manual โ€” yes, the header literally says [FIXME: manual], iconic ๐Ÿ˜ญ โ€” and it binds one or more named texture images to a sequence of consecutive image units. That's the whole assignment, bestie.


๐Ÿงพ C SPECIFICATION ๐Ÿงพ

void glBindImageTextures(GLuint first, GLsizei count,
                         const GLuint *textures);

๐ŸŽ€ PARAMETERS ๐ŸŽ€

  • first โ€” the first image unit where a texture is gonna get bound. The starting slot, basically.
  • count โ€” how many textures we're binding. The number of slots we're filling.
  • textures โ€” the address of an array of names of existing texture objects. Names, not the textures themselves, iykyk.

๐Ÿ’– DESCRIPTION ๐Ÿ’–

glBindImageTextures binds images from an array of existing texture objects to a specified number of consecutive image units. count says how many texture objects have their names stored in the array textures. That many texture names get read from the array and bound to the count consecutive texture units starting from first. If the name zero appears in the textures array, any existing binding to the image unit is reset. Any non-zero entry in textures must be the name of an existing texture object. When a non-zero entry in textures is present, the image at level zero is bound, the binding is considered layered, with the first layer set to zero, and the image is bound for read-write access. The image unit format parameter is taken from the internal format of the image at level zero of the texture object. For cube map textures, the internal format of the positive X image of level zero is used. If textures is NULL then it's as if an appropriately sized array containing only zeros had been specified.

glBindImageTextures is equivalent to the following pseudo code:

for (i = 0; i < count; i++) {
    if (textures == NULL || textures[i] = 0) {
        glBindImageTexture(first + i, 0, 0, GL_FALSE, 0, GL_READ_ONLY, GL_R8);
    } else {
        glBindImageTexture(first + i, textures[i], 0, GL_TRUE, 0, GL_READ_WRITE, lookupInternalFormat(textures[i]));
    }
}

Each entry in textures will be checked individually and if found to be invalid, the state for that image unit will not be changed and an error will be generated. However โ€” and this is the important part โ€” the state for other texture image units referenced by the command will still be updated. One bad entry does not cancel the whole group chat, fr fr.

also yes, the pseudo code above literally has textures[i] = 0 with a single =, not ==. that's what the page says. do not come for me ๐Ÿ˜ญ

๐Ÿฆ‹ NOTES ๐Ÿฆ‹

  • glBindImageTextures is available only if the GL version is 4.4 or higher.
  • Big note: because glBindImageTextures cannot create new textures โ€” even if a name passed has been previously generated by call to glGenTextures() โ€” names passed to glBindImageTextures must have been bound at least once previously via a call to glBindTexture().

๐Ÿ’€ ERRORS ๐Ÿ’€

  • GL_INVALID_OPERATION is generated if first + count is greater than the number of image units supported by the implementation.
  • GL_INVALID_OPERATION is generated if any value in textures is not zero or the name of an existing texture object.
  • GL_INVALID_OPERATION error is generated if the internal format of the level zero texture image of any texture in textures is not supported.
  • GL_INVALID_OPERATION error is generated if the width, height, or depth of the level zero texture image of any texture in textures is zero.

๐ŸŒˆ ASSOCIATED GETS ๐ŸŒˆ

glGet() with argument GL_TEXTURE_BINDING_1D, GL_TEXTURE_BINDING_2D, GL_TEXTURE_BINDING_3D, GL_TEXTURE_BINDING_1D_ARRAY, GL_TEXTURE_BINDING_2D_ARRAY, GL_TEXTURE_BINDING_RECTANGLE, GL_TEXTURE_BINDING_BUFFER, GL_TEXTURE_BINDING_CUBE_MAP, GL_TEXTURE_BINDING_CUBE_MAP, GL_TEXTURE_BINDING_CUBE_MAP_ARRAY, GL_TEXTURE_BINDING_2D_MULTISAMPLE, or GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY. and yes, GL_TEXTURE_BINDING_CUBE_MAP is literally in there twice in the original โ€” no cap ๐Ÿ’€

๐Ÿ‘‘ VERSION SUPPORT ๐Ÿ‘‘

here's the chart, copied exactly because the vibes are the data, bestie:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     โ”‚                OpenGL Version                                         โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Function            โ”‚ 2.0 โ”‚ 2.1 โ”‚ 3.0 โ”‚ 3.1 โ”‚ 3.2 โ”‚ 3.3 โ”‚ 4.0 โ”‚ 4.1 โ”‚ 4.2 โ”‚ 4.3 โ”‚ 4.4 โ”‚ 4.5 โ”‚
โ”‚ /                   โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚
โ”‚ Feature             โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚
โ”‚ Name                โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ glBindImageTextures โ”‚  -  โ”‚  -  โ”‚  -  โ”‚  -  โ”‚  -  โ”‚  -  โ”‚  -  โ”‚  -  โ”‚  -  โ”‚  -  โ”‚  โœ”  โ”‚  โœ”  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿซถ SEE ALSO ๐Ÿซถ

glBindTexture(), glBindTextures(), glDeleteTextures(), glGenTextures(), glGet(), glGetTexParameter(), glIsTexture(), glTexStorage1D(), glTexStorage2D(), glTexStorage2DMultisample(), glTexStorage3D(), glTexStorage3DMultisample(), glTexBuffer(), glTexParameter()

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


okay bye bestie ๐Ÿ’– this page is from [FIXME: source], dated 08/09/2021, and it's GLBINDIMAGETEXTURES(3G). slay and stay็ป‘ๅฎš-ed โœจ

๐Ÿ“ฆ where this page comes from