rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man4 / glGetProgramStage.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="glGetProgramStage">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2010</year>
9 <holder>Khronos Group.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glGetProgramStage</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glGetProgramStage</refname>
17 <refpurpose>retrieve properties of a program object corresponding to a specified shader stage</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glGetProgramStageiv</function></funcdef>
23 <paramdef>GLuint <parameter>program</parameter></paramdef>
24 <paramdef>GLenum <parameter>shadertype</parameter></paramdef>
25 <paramdef>GLenum <parameter>pname</parameter></paramdef>
26 <paramdef>GLint *<parameter>values</parameter></paramdef>
27 </funcprototype>
28 </funcsynopsis>
29 </refsynopsisdiv>
30 <!-- eqn: ignoring delim $$ -->
31 <refsect1 id="parameters"><title>Parameters</title>
32 <variablelist>
33 <varlistentry>
34 <term><parameter>program</parameter></term>
35 <listitem>
36 <para>
37 Specifies the name of the program containing shader stage.
38 </para>
39 </listitem>
40 </varlistentry>
41 <varlistentry>
42 <term><parameter>shadertype</parameter></term>
43 <listitem>
44 <para>
45 Specifies the shader stage from which to query for the subroutine parameter. <parameter>shadertype</parameter>
46 must be one of <constant>GL_VERTEX_SHADER</constant>, <constant>GL_TESS_CONTROL_SHADER</constant>,
47 <constant>GL_TESS_EVALUATION_SHADER</constant>, <constant>GL_GEOMETRY_SHADER</constant> or
48 <constant>GL_FRAGMENT_SHADER</constant>.
49 </para>
50 </listitem>
51 </varlistentry>
52 <varlistentry>
53 <term><parameter>pname</parameter></term>
54 <listitem>
55 <para>
56 Specifies the parameter of the shader to query. <parameter>pname</parameter>
57 must be <constant>GL_ACTIVE_SUBROUTINE_UNIFORMS</constant>,
58 <constant>GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS</constant>,
59 <constant>GL_ACTIVE_SUBROUTINES</constant>,
60 <constant>GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH</constant>,
61 or <constant>GL_ACTIVE_SUBROUTINE_MAX_LENGTH</constant>.
62 </para>
63 </listitem>
64 </varlistentry>
65 <varlistentry>
66 <term><parameter>values</parameter></term>
67 <listitem>
68 <para>
69 Specifies the address of a variable into which the queried value or values will be placed.
70 </para>
71 </listitem>
72 </varlistentry>
73 </variablelist>
74 </refsect1>
75 <refsect1 id="description"><title>Description</title>
76 <para>
77 <function>glGetProgramStage</function> queries a parameter of a shader stage attached to a program object.
78 <parameter>program</parameter> contains the name of the program to which the shader is attached. <parameter>shadertype</parameter>
79 specifies the stage from which to query the parameter. <parameter>pname</parameter> specifies which parameter
80 should be queried. The value or values of the parameter to be queried is returned in the variable whose address
81 is given in <parameter>values</parameter>.
82 </para>
83 <para>
84 If <parameter>pname</parameter> is <constant>GL_ACTIVE_SUBROUTINE_UNIFORMS</constant>, the number
85 of active subroutine variables in the stage is returned in <parameter>values</parameter>.
86 </para>
87 <para>
88 If <parameter>pname</parameter> is <constant>GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS</constant>,
89 the number of active subroutine variable locations in the stage is returned in <parameter>values</parameter>.
90 </para>
91 <para>
92 If <parameter>pname</parameter> is <constant>GL_ACTIVE_SUBROUTINES</constant>,
93 the number of active subroutines in the stage is returned in <parameter>values</parameter>.
94 </para>
95 <para>
96 If <parameter>pname</parameter> is <constant>GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH</constant>,
97 the length of the longest subroutine uniform for the stage is returned in <parameter>values</parameter>.
98 </para>
99 <para>
100 If <parameter>pname</parameter> is <constant>GL_ACTIVE_SUBROUTINE_MAX_LENGTH</constant>,
101 the length of the longest subroutine name for the stage is returned in <parameter>values</parameter>. The
102 returned name length includes space for the null-terminator.
103 </para>
104 <para>
105 If there is no shader present of type <parameter>shadertype</parameter>, the returned value will be consistent
106 with a shader containing no subroutines or subroutine uniforms.
107 </para>
108 </refsect1>
109 <refsect1 id="errors"><title>Errors</title>
110 <para>
111 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>shadertype</parameter> or <parameter>pname</parameter>
112 is not one of the accepted values.
113 </para>
114 <para>
115 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>program</parameter> is not the name of an
116 existing program object.
117 </para>
118 </refsect1>
119 <refsect1 id="seealso"><title>See Also</title>
120 <para>
121 <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
122 </para>
123 </refsect1>
124 <refsect1 id="Copyright"><title>Copyright</title>
125 <para>
126 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group.
127 This material may be distributed subject to the terms and conditions set forth in
128 the Open Publication License, v 1.0, 8 June 1999.
129 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
130 </para>
131 </refsect1>
132</refentry>