1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id=
"glShaderStorageBlockBinding">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glShaderStorageBlockBinding
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glShaderStorageBlockBinding
</refname>
17 <refpurpose>change an active shader storage block binding
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glShaderStorageBlockBinding
</function></funcdef>
23 <paramdef>GLuint
<parameter>program
</parameter></paramdef>
24 <paramdef>GLuint
<parameter>storageBlockIndex
</parameter></paramdef>
25 <paramdef>GLuint
<parameter>storageBlockBinding
</parameter></paramdef>
29 <refsect1 id=
"parameters"><title>Parameters
</title>
32 <term><parameter>program
</parameter></term>
35 The name of the program containing the block whose binding to change.
40 <term><parameter>storageBlockIndex
</parameter></term>
43 The index storage block within the program.
48 <term><parameter>storageBlockBinding
</parameter></term>
51 The index storage block binding to associate with the specified storage block.
57 <refsect1 id=
"description"><title>Description
</title>
59 <function>glShaderStorageBlockBinding
</function>, changes the active
60 shader storage block with an assigned index of
<parameter>storageBlockIndex
</parameter>
61 in program object
<parameter>program
</parameter>.
<parameter>storageBlockIndex
</parameter> must be an active shader storage block
62 index in
<parameter>program
</parameter>.
<parameter>storageBlockBinding
</parameter> must be less than the value of
<constant>GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS
</constant>.
63 If successful,
<function>glShaderStorageBinding
</function> specifies that
<parameter>program
</parameter> will use the data store of
64 the buffer object bound to the binding point
<parameter>storageBlockBinding
</parameter> to read
65 and write the values of the buffer variables in the shader storage block identified by
<parameter>storageBlockIndex
</parameter>.
68 <refsect1 id=
"errors"><title>Errors
</title>
70 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>attribindex
</parameter> is greater than
71 or equal to the value of
<constant>GL_MAX_VERTEX_ATTRIBS
</constant>.
74 <constant>GL_INVAILD_VALUE
</constant> is generated if
<parameter>bindingindex
</parameter> is greater than
75 or equal to the value of
<constant>GL_MAX_VERTEX_ATTRIB_BINDINGS
</constant>.
78 <constant>GL_INVALID_OPERATION
</constant> is generated if no vertex array object is bound.
81 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
83 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with arguments
<constant>GL_SHADER_STORAGE_BUFFER_BINDING
</constant>,
84 <constant>GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS
</constant>,
<constant>GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS
</constant>,
85 <constant>GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS
</constant>,
<constant>GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS
</constant>,
86 <constant>GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS
</constant>,
<constant>GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS
</constant>,
87 <constant>GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS
</constant> or
<constant>GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS
</constant>,
88 <constant>GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS
</constant>, or
<constant>GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES
</constant>.
91 <refsect1 id=
"Copyright"><title>Copyright
</title>
93 Copyright
<trademark class=
"copyright"></trademark> 2012 Khronos Group.
94 This material may be distributed subject to the terms and conditions set forth in
95 the Open Publication License, v
1.0,
8 June
1999.
96 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.