Commit | Line | Data |
---|---|---|
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="glGetShader"> | |
5 | <refmeta> | |
6 | <refentrytitle>glGetShader</refentrytitle> | |
7 | <manvolnum>3G</manvolnum> | |
8 | </refmeta> | |
9 | <refnamediv> | |
10 | <refname>glGetShaderiv</refname> | |
11 | <refpurpose>Returns a parameter from a shader object</refpurpose> | |
12 | </refnamediv> | |
13 | <refsynopsisdiv><title>C Specification</title> | |
14 | <funcsynopsis> | |
15 | <funcprototype> | |
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> | |
20 | </funcprototype> | |
21 | </funcsynopsis> | |
22 | </refsynopsisdiv> | |
23 | <refsect1 id="parameters"><title>Parameters</title> | |
24 | <variablelist> | |
25 | <varlistentry> | |
26 | <term><parameter>shader</parameter></term> | |
27 | <listitem> | |
28 | <para>Specifies the shader object to be | |
29 | queried.</para> | |
30 | </listitem> | |
31 | </varlistentry> | |
32 | <varlistentry> | |
33 | <term><parameter>pname</parameter></term> | |
34 | <listitem> | |
35 | <para>Specifies the object parameter. Accepted | |
36 | symbolic names are | |
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> | |
42 | </listitem> | |
43 | </varlistentry> | |
44 | <varlistentry> | |
45 | <term><parameter>params</parameter></term> | |
46 | <listitem> | |
47 | <para>Returns the requested object parameter.</para> | |
48 | </listitem> | |
49 | </varlistentry> | |
50 | </variablelist> | |
51 | </refsect1> | |
52 | <refsect1 id="description"><title>Description</title> | |
53 | ||
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> | |
58 | ||
59 | <variablelist> | |
60 | <varlistentry> | |
61 | <term><constant>GL_SHADER_TYPE</constant></term> | |
62 | <listitem> | |
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 | |
69 | shader object.</para> | |
70 | </listitem> | |
71 | </varlistentry> | |
72 | ||
73 | <varlistentry> | |
74 | <term><constant>GL_DELETE_STATUS</constant></term> | |
75 | <listitem> | |
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> | |
80 | otherwise.</para> | |
81 | </listitem> | |
82 | </varlistentry> | |
83 | ||
84 | <varlistentry> | |
85 | <term><constant>GL_COMPILE_STATUS</constant></term> | |
86 | <listitem> | |
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> | |
91 | otherwise.</para> | |
92 | </listitem> | |
93 | </varlistentry> | |
94 | ||
95 | <varlistentry> | |
96 | <term><constant>GL_INFO_LOG_LENGTH</constant></term> | |
97 | <listitem> | |
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> | |
105 | </listitem> | |
106 | </varlistentry> | |
107 | ||
108 | <varlistentry> | |
109 | <term><constant>GL_SHADER_SOURCE_LENGTH</constant></term> | |
110 | <listitem> | |
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 | |
118 | returned.</para> | |
119 | </listitem> | |
120 | </varlistentry> | |
121 | </variablelist> | |
122 | </refsect1> | |
123 | <refsect1 id="notes"><title>Notes</title> | |
124 | ||
125 | <para>If an error is generated, no change is made to the | |
126 | contents of <parameter>params</parameter>.</para> | |
127 | </refsect1> | |
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 | |
131 | OpenGL.</para> | |
132 | ||
133 | <para><constant>GL_INVALID_OPERATION</constant> is generated if | |
134 | <parameter>shader</parameter> does not refer to a shader | |
135 | object.</para> | |
136 | ||
137 | <para><constant>GL_INVALID_ENUM</constant> is generated if | |
138 | <parameter>pname</parameter> is not an accepted value.</para> | |
139 | ||
140 | </refsect1> | |
141 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
142 | <para><citerefentry><refentrytitle>glGetShaderInfoLog</refentrytitle></citerefentry> | |
143 | with argument <parameter>shader</parameter></para> | |
144 | ||
145 | <para><citerefentry><refentrytitle>glGetShaderSource</refentrytitle></citerefentry> | |
146 | with argument <parameter>shader</parameter></para> | |
147 | ||
148 | <para><citerefentry><refentrytitle>glIsShader</refentrytitle></citerefentry></para> | |
149 | </refsect1> | |
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> | |
156 | </refsect1> | |
157 | <refsect1 id="Copyright"><title>Copyright</title> | |
158 | <para> | |
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>. | |
163 | </para> | |
164 | </refsect1> | |
165 | </refentry> |