rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man4 / glUseProgramStages.xml
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="glUseProgramStages">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2010</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glUseProgramStages</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glUseProgramStages</refname>
17 <refpurpose>bind stages of a program object to a program pipeline</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glUseProgramStages</function></funcdef>
23 <paramdef>GLuint <parameter>pipeline</parameter></paramdef>
24 <paramdef>GLbitfield <parameter>stages</parameter></paramdef>
25 <paramdef>GLuint <parameter>program</parameter></paramdef>
26 </funcprototype>
27 </funcsynopsis>
28 </refsynopsisdiv>
29 <refsect1 id="parameters"><title>Parameters</title>
30 <variablelist>
31 <varlistentry>
32 <term><parameter>pipeline</parameter></term>
33 <listitem>
34 <para>
35 Specifies the program pipeline object to which to bind stages from <parameter>program</parameter>.
36 </para>
37 </listitem>
38 </varlistentry>
39 <varlistentry>
40 <term><parameter>stages</parameter></term>
41 <listitem>
42 <para>
43 Specifies a set of program stages to bind to the program pipeline object.
44 </para>
45 </listitem>
46 </varlistentry>
47 <varlistentry>
48 <term><parameter>program</parameter></term>
49 <listitem>
50 <para>
51 Specifies the program object containing the shader executables to use in <parameter>pipeline</parameter>.
52 </para>
53 </listitem>
54 </varlistentry>
55 </variablelist>
56 </refsect1>
57 <refsect1 id="description"><title>Description</title>
58 <para>
59 <function>glUseProgramStages</function> binds executables from a program object
60 associated with a specified set of shader stages to the program pipeline object given
61 by <parameter>pipeline</parameter>.
62 <parameter>pipeline</parameter> specifies the program pipeline object to which to bind
63 the executables. <parameter>stages</parameter> contains a logical combination of bits
64 indicating the shader stages to use within <parameter>program</parameter> with the program
65 pipeline object <parameter>pipeline</parameter>. <parameter>stages</parameter> must be
66 a logical combination of <constant>GL_VERTEX_SHADER_BIT</constant>,
67 <constant>GL_TESS_CONTROL_SHADER_BIT</constant>, <constant>GL_TESS_EVALUATION_SHADER_BIT</constant>,
68 <constant>GL_GEOMETRY_SHADER_BIT</constant>, <constant>GL_FRAGMENT_SHADER_BIT</constant> and <constant>GL_COMPUTE_SHADER_BIT</constant>.
69 Additionally, the special value <constant>GL_ALL_SHADER_BITS</constant> may be specified to
70 indicate that all executables contained in <parameter>program</parameter> should be
71 installed in <parameter>pipeline</parameter>.
72 </para>
73 <para>
74 If <parameter>program</parameter> refers to a program object with a valid shader attached for
75 an indicated shader stage, <function>glUseProgramStages</function> installs the executable
76 code for that stage in the indicated program pipeline object <parameter>pipeline</parameter>.
77 If <parameter>program</parameter> is zero, or refers to a program object with no valid shader
78 executable for a given stage, it is as if the pipeline object has no programmable stage configured
79 for the indicated shader stages. If <parameter>stages</parameter> contains bits other than those
80 listed above, and is not equal to <constant>GL_ALL_SHADER_BITS</constant>, an error is generated.
81 </para>
82 </refsect1>
83 <refsect1 id="notes"><title>Notes</title>
84 <para>
85 The <constant>GL_COMPUTE_SHADER_BIT</constant> bit is available only if the GL version is 4.3 or greater.
86 </para>
87 </refsect1>
88 <refsect1 id="errors"><title>Errors</title>
89 <para>
90 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>shaders</parameter> contains
91 set bits that are not recognized, and is not the reserved value <constant>GL_ALL_SHADER_BITS</constant>.
92 </para>
93 <para>
94 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>program</parameter> refers
95 to a program object that was not linked with its <constant>GL_PROGRAM_SEPARABLE</constant> status set.
96 </para>
97 <para>
98 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>program</parameter> refers
99 to a program object that has not been successfully linked.
100 </para>
101 <para>
102 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>pipeline</parameter> is not
103 a name previously returned from a call to <citerefentry><refentrytitle>glGenProgramPipelines</refentrytitle></citerefentry>
104 or if such a name has been deleted by a call to
105 <citerefentry><refentrytitle>glDeleteProgramPipelines</refentrytitle></citerefentry>.
106 </para>
107 </refsect1>
108 <refsect1 id="seealso"><title>See Also</title>
109 <para>
110 <citerefentry><refentrytitle>glGenProgramPipelines</refentrytitle></citerefentry>,
111 <citerefentry><refentrytitle>glDeleteProgramPipelines</refentrytitle></citerefentry>,
112 <citerefentry><refentrytitle>glIsProgramPipeline</refentrytitle></citerefentry>
113 </para>
114 </refsect1>
115 <refsect1 id="Copyright"><title>Copyright</title>
116 <para>
117 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group.
118 This material may be distributed subject to the terms and conditions set forth in
119 the Open Publication License, v 1.0, 8 June 1999.
120 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
121 </para>
122 </refsect1>
123 </refentry>