rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man4 / glGetUniformSubroutine.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="glGetUniformSubroutine">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2010</year>
9 <holder>Khronos Group.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glGetUniformSubroutine</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glGetUniformSubroutine</refname>
17 <refpurpose>retrieve the value of a subroutine uniform of a given shader stage of the current program</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glGetUniformSubroutineuiv</function></funcdef>
23 <paramdef>GLenum <parameter>shadertype</parameter></paramdef>
24 <paramdef>GLint <parameter>location</parameter></paramdef>
25 <paramdef>GLuint *<parameter>values</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>location</parameter></term>
46 <listitem>
47 <para>
48 Specifies the location of the subroutine uniform.
49 </para>
50 </listitem>
51 </varlistentry>
52 <varlistentry>
53 <term><parameter>values</parameter></term>
54 <listitem>
55 <para>
56 Specifies the address of a variable to receive the value or values of the subroutine uniform.
57 </para>
58 </listitem>
59 </varlistentry>
60 </variablelist>
61 </refsect1>
62 <refsect1 id="description"><title>Description</title>
63 <para>
64 <function>glGetUniformSubroutine</function> retrieves the value of the subroutine uniform at location
65 <parameter>location</parameter> for shader stage <parameter>shadertype</parameter> of the current
66 program. <parameter>location</parameter> must be less than the value of
67 <constant>GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS</constant> for the shader currently in use at
68 shader stage <parameter>shadertype</parameter>. The value of the subroutine uniform is returned in
69 <parameter>values</parameter>.
70 </para>
71 </refsect1>
72 <refsect1 id="errors"><title>Errors</title>
73 <para>
74 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>shadertype</parameter> is not one of the accepted values.
75 </para>
76 <para>
77 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>location</parameter> is greater than or equal to
78 the value of <constant>GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS</constant> for the shader currently in use at
79 shader stage <parameter>shadertype</parameter>.
80 </para>
81 <para>
82 <constant>GL_INVALID_OPERATION</constant> is generated if no program is active.
83 </para>
84 </refsect1>
85 <refsect1 id="seealso"><title>See Also</title>
86 <para>
87 <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>,
88 <citerefentry><refentrytitle>glGetActiveSubroutineUniform</refentrytitle></citerefentry>,
89 <citerefentry><refentrytitle>glGetActiveSubroutineUniformName</refentrytitle></citerefentry>,
90 <citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>
91 </para>
92 </refsect1>
93 <refsect1 id="Copyright"><title>Copyright</title>
94 <para>
95 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group.
96 This material may be distributed subject to the terms and conditions set forth in
97 the Open Publication License, v 1.0, 8 June 1999.
98 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
99 </para>
100 </refsect1>
101</refentry>