logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

glBindTextureUnit - bind an existing texture object to the specified texture unit

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_ARRAY,
       GL_TEXTURE_BINDING_2D_MULTISAMPLE or GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY.

C Specification

voidglBindTextureUnit(GLuintunit,GLuinttexture);

Description

glBindTextureUnit binds an existing texture object to the texture unit numbered unit.

       texture must be zero or the name of an existing texture object. When texture is the name of an existing
       texture object, that object is bound to the target, in the corresponding texture unit, that was specified
       when the object was created. When texture is zero, each of the targets enumerated at the beginning of
       this section is reset to its default texture for the corresponding texture image unit.

Errors

GL_INVALID_OPERATION error is generated if texture is not zero or the name of an existing texture object.

Name

       glBindTextureUnit - bind an existing texture object to the specified texture unit

Parameters

unit
           Specifies the texture unit, to which the texture object should be bound to.

       texture
           Specifies the name of a texture.

See Also

glDeleteTextures(), glGenTextures(), glGet(), glGetTexParameter(), glIsTexture(), glTexImage1D(),
       glTexImage2D(), glTexImage2DMultisample(), glTexImage3D(), glTexImage3DMultisample(), glTexBuffer(),
       glTexParameter()

Version Support

       ┌───────────────────┬───────────────────────────────────────────────────────────────────────┐
       │                   │                OpenGLVersion                                         │
       ├───────────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
       │ Function2.02.13.03.13.23.34.04.14.24.34.44.5 │
       │ /                 │     │     │     │     │     │     │     │     │     │     │     │     │
       │ Feature           │     │     │     │     │     │     │     │     │     │     │     │     │
       │ Name              │     │     │     │     │     │     │     │     │     │     │     │     │
       ├───────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
       │ glBindTextureUnit │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  ✔  │
       └───────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘

See Also