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

glShaderStorageBlockBinding - change an active shader storage block binding

Associated Gets

glGet() with arguments GL_SHADER_STORAGE_BUFFER_BINDING, GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS,
       GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS,
       GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS, GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS,
       GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS, GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS or
       GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS, GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS, or
       GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES.

C Specification

voidglShaderStorageBlockBinding(GLuintprogram,GLuintstorageBlockIndex,GLuintstorageBlockBinding);

Description

glShaderStorageBlockBinding, changes the active shader storage block with an assigned index of
       storageBlockIndex in program object program.  storageBlockIndex must be an active shader storage block
       index in program.  storageBlockBinding must be less than the value of
       GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS. If successful, glShaderStorageBinding specifies that program will
       use the data store of the buffer object bound to the binding point storageBlockBinding to read and write
       the values of the buffer variables in the shader storage block identified by storageBlockIndex.

Errors

GL_INVALID_VALUE is generated if attribindex is greater than or equal to the value of
       GL_MAX_VERTEX_ATTRIBS.

       GL_INVALID_VALUE is generated if bindingindex is greater than or equal to the value of
       GL_MAX_VERTEX_ATTRIB_BINDINGS.

       GL_INVALID_OPERATION is generated if no vertex array object is bound.

Name

       glShaderStorageBlockBinding - change an active shader storage block binding

Parameters

program
           The name of the program containing the block whose binding to change.

       storageBlockIndex
           The index storage block within the program.

       storageBlockBinding
           The index storage block binding to associate with the specified storage block.

See Also

Version Support

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

See Also