rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man4 / glUniformSubroutines.xml
CommitLineData
7faf1d71
AW
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="glUniformSubroutines">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2010</year>
9 <holder>Khronos Group.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glUniformSubroutines</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glUniformSubroutines</refname>
17 <refpurpose>load active subroutine uniforms</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glUniformSubroutinesuiv</function></funcdef>
23 <paramdef>GLenum <parameter>shadertype</parameter></paramdef>
24 <paramdef>GLsizei <parameter>count</parameter></paramdef>
25 <paramdef>const GLuint *<parameter>indices</parameter></paramdef>
26 </funcprototype>
27 </funcsynopsis>
28 </refsynopsisdiv>
29 <!-- eqn: ignoring delim $$ -->
30 <refsect1 id="parameters"><title>Parameters</title>
31 <variablelist>
32 <varlistentry>
33 <term><parameter>shadertype</parameter></term>
34 <listitem>
35 <para>
36 Specifies the shader stage from which to query for subroutine uniform index.
37 <parameter>shadertype</parameter>
38 must be one of <constant>GL_VERTEX_SHADER</constant>, <constant>GL_TESS_CONTROL_SHADER</constant>,
39 <constant>GL_TESS_EVALUATION_SHADER</constant>, <constant>GL_GEOMETRY_SHADER</constant> or
40 <constant>GL_FRAGMENT_SHADER</constant>.
41 </para>
42 </listitem>
43 </varlistentry>
44 <varlistentry>
45 <term><parameter>count</parameter></term>
46 <listitem>
47 <para>
48 Specifies the number of uniform indices stored in <parameter>indices</parameter>.
49 </para>
50 </listitem>
51 </varlistentry>
52 <varlistentry>
53 <term><parameter>indices</parameter></term>
54 <listitem>
55 <para>
56 Specifies the address of an array holding the indices to load into the shader subroutine variables.
57 </para>
58 </listitem>
59 </varlistentry>
60 </variablelist>
61 </refsect1>
62 <refsect1 id="description"><title>Description</title>
63 <para>
64 <function>glUniformSubroutines</function> loads all active subroutine uniforms for shader stage
65 <parameter>shadertype</parameter> of the current program with subroutine indices from <parameter>indices</parameter>,
66 storing <parameter>indices[i]</parameter> into the uniform at location <parameter>i</parameter>.
67 <parameter>count</parameter> must be equal to the value of <constant>GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS</constant>
68 for the program currently in use at shader stage <parameter>shadertype</parameter>. Furthermore, all values in
69 <parameter>indices</parameter> must be less than the value of <constant>GL_ACTIVE_SUBROUTINES</constant>
70 for the shader stage.
71 </para>
72 </refsect1>
73 <refsect1 id="errors"><title>Errors</title>
74 <para>
75 <constant>GL_INVALID_OPERATION</constant> is generated if no program object is current.
76 </para>
77 <para>
78 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>count</parameter> is not equal to the value
79 of <constant>GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS</constant> for the shader stage <parameter>shadertype</parameter>
80 of the current program.
81 </para>
82 <para>
83 <constant>GL_INVALID_VALUE</constant> is generated if any value in <parameter>indices</parameter> is geater
84 than or equal to the value of <constant>GL_ACTIVE_SUBROUTINES</constant> for the shader stage <parameter>shadertype</parameter>
85 of the current program.
86 </para>
87 <para>
88 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>shadertype</parameter> is not one of the accepted values.
89 </para>
90 </refsect1>
91 <refsect1 id="associatedgets"><title>Associated Gets</title>
92 <para>
93 <citerefentry><refentrytitle>glGetProgramStage</refentrytitle></citerefentry> with argument <constant>GL_ACTIVE_SUBROUTINES</constant>
94 </para>
95 <para>
96 <citerefentry><refentrytitle>glGetProgramStage</refentrytitle></citerefentry> with argument <constant>GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS</constant>
97 </para>
98 </refsect1>
99 <refsect1 id="seealso"><title>See Also</title>
100 <para>
101 <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>,
102 <citerefentry><refentrytitle>glGetActiveSubroutineUniform</refentrytitle></citerefentry>,
103 <citerefentry><refentrytitle>glGetActiveSubroutineUniformName</refentrytitle></citerefentry>,
104 <citerefentry><refentrytitle>glGetProgramStage</refentrytitle></citerefentry>
105 </para>
106 </refsect1>
107 <refsect1 id="Copyright"><title>Copyright</title>
108 <para>
109 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group.
110 This material may be distributed subject to the terms and conditions set forth in
111 the Open Publication License, v 1.0, 8 June 1999.
112 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
113 </para>
114 </refsect1>
115</refentry>