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=
"glGetShader">
6 <refentrytitle>glGetShader
</refentrytitle>
7 <manvolnum>3G
</manvolnum>
10 <refname>glGetShaderiv
</refname>
11 <refpurpose>Returns a parameter from a shader object
</refpurpose>
13 <refsynopsisdiv><title>C Specification
</title>
16 <funcdef>void
<function>glGetShaderiv
</function></funcdef>
17 <paramdef>GLuint
<parameter>shader
</parameter></paramdef>
18 <paramdef>GLenum
<parameter>pname
</parameter></paramdef>
19 <paramdef>GLint *
<parameter>params
</parameter></paramdef>
23 <refsect1 id=
"parameters"><title>Parameters
</title>
26 <term><parameter>shader
</parameter></term>
28 <para>Specifies the shader object to be
33 <term><parameter>pname
</parameter></term>
35 <para>Specifies the object parameter. Accepted
37 <constant>GL_SHADER_TYPE
</constant>,
38 <constant>GL_DELETE_STATUS
</constant>,
39 <constant>GL_COMPILE_STATUS
</constant>,
40 <constant>GL_INFO_LOG_LENGTH
</constant>,
41 <constant>GL_SHADER_SOURCE_LENGTH
</constant>.
</para>
45 <term><parameter>params
</parameter></term>
47 <para>Returns the requested object parameter.
</para>
52 <refsect1 id=
"description"><title>Description
</title>
54 <para><function>glGetShader
</function>
55 returns in
<parameter>params
</parameter>
56 the value of a parameter for a specific shader object. The
57 following parameters are defined:
</para>
61 <term><constant>GL_SHADER_TYPE
</constant></term>
63 <para> <parameter>params
</parameter> returns
64 <constant>GL_VERTEX_SHADER
</constant> if
65 <parameter>shader
</parameter> is a vertex shader
66 object,
<constant>GL_GEOMETRY_SHADER
</constant> if
<parameter>shader
</parameter>
67 is a geometry shader object, and
<constant>GL_FRAGMENT_SHADER
</constant>
68 if
<parameter>shader
</parameter> is a fragment
74 <term><constant>GL_DELETE_STATUS
</constant></term>
76 <para> <parameter>params
</parameter> returns
77 <constant>GL_TRUE
</constant> if
78 <parameter>shader
</parameter> is currently flagged
79 for deletion, and
<constant>GL_FALSE
</constant>
85 <term><constant>GL_COMPILE_STATUS
</constant></term>
87 <para> <parameter>params
</parameter> returns
88 <constant>GL_TRUE
</constant> if the last compile
89 operation on
<parameter>shader
</parameter> was
90 successful, and
<constant>GL_FALSE
</constant>
96 <term><constant>GL_INFO_LOG_LENGTH
</constant></term>
98 <para> <parameter>params
</parameter> returns the
99 number of characters in the information log for
100 <parameter>shader
</parameter> including the null
101 termination character (i.e., the size of the
102 character buffer required to store the information
103 log). If
<parameter>shader
</parameter> has no
104 information log, a value of
0 is returned.
</para>
109 <term><constant>GL_SHADER_SOURCE_LENGTH
</constant></term>
111 <para> <parameter>params
</parameter> returns the
112 length of the concatenation of the source strings
113 that make up the shader source for the
114 <parameter>shader
</parameter>, including the null
115 termination character. (i.e., the size of the
116 character buffer required to store the shader
117 source). If no source code exists,
0 is
123 <refsect1 id=
"notes"><title>Notes
</title>
125 <para>If an error is generated, no change is made to the
126 contents of
<parameter>params
</parameter>.
</para>
128 <refsect1 id=
"errors"><title>Errors
</title>
129 <para><constant>GL_INVALID_VALUE
</constant> is generated if
130 <parameter>shader
</parameter> is not a value generated by
133 <para><constant>GL_INVALID_OPERATION
</constant> is generated if
134 <parameter>shader
</parameter> does not refer to a shader
137 <para><constant>GL_INVALID_ENUM
</constant> is generated if
138 <parameter>pname
</parameter> is not an accepted value.
</para>
141 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
142 <para><citerefentry><refentrytitle>glGetShaderInfoLog
</refentrytitle></citerefentry>
143 with argument
<parameter>shader
</parameter></para>
145 <para><citerefentry><refentrytitle>glGetShaderSource
</refentrytitle></citerefentry>
146 with argument
<parameter>shader
</parameter></para>
148 <para><citerefentry><refentrytitle>glIsShader
</refentrytitle></citerefentry></para>
150 <refsect1 id=
"seealso"><title>See Also
</title>
151 <para><citerefentry><refentrytitle>glCompileShader
</refentrytitle></citerefentry>,
152 <citerefentry><refentrytitle>glCreateShader
</refentrytitle></citerefentry>,
153 <citerefentry><refentrytitle>glDeleteShader
</refentrytitle></citerefentry>,
154 <citerefentry><refentrytitle>glGetProgram
</refentrytitle></citerefentry>,
155 <citerefentry><refentrytitle>glShaderSource
</refentrytitle></citerefentry></para>
157 <refsect1 id=
"Copyright"><title>Copyright
</title>
159 Copyright
<trademark class=
"copyright"></trademark> 2003-
2005 3Dlabs Inc. Ltd.
160 This material may be distributed subject to the terms and conditions set forth in
161 the Open Publication License, v
1.0,
8 June
1999.
162 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.