ed10964e39dc0c7008427f07970ae55cfe663968
[clinton/guile-figl.git] / upstream-man-pages / man2 / glGetShaderInfoLog.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="glGetShaderInfoLog">
5 <refmeta>
6 <refentrytitle>glGetShaderInfoLog</refentrytitle>
7 <manvolnum>3G</manvolnum>
8 </refmeta>
9 <refnamediv>
10 <refname>glGetShaderInfoLog</refname>
11 <refpurpose>Returns the information log for a shader object</refpurpose>
12 </refnamediv>
13 <refsynopsisdiv><title>C Specification</title>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>void <function>glGetShaderInfoLog</function></funcdef>
17 <paramdef>GLuint <parameter>shader</parameter></paramdef>
18 <paramdef>GLsizei <parameter>maxLength</parameter></paramdef>
19 <paramdef>GLsizei *<parameter>length</parameter></paramdef>
20 <paramdef>GLchar *<parameter>infoLog</parameter></paramdef>
21 </funcprototype>
22 </funcsynopsis>
23 </refsynopsisdiv>
24 <refsect1 id="parameters"><title>Parameters</title>
25 <variablelist>
26 <varlistentry>
27 <term><parameter>shader</parameter></term>
28 <listitem>
29 <para>Specifies the shader object whose information
30 log is to be queried.</para>
31 </listitem>
32 </varlistentry>
33 <varlistentry>
34 <term><parameter>maxLength</parameter></term>
35 <listitem>
36 <para>Specifies the size of the character buffer for
37 storing the returned information log.</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>length</parameter></term>
42 <listitem>
43 <para>Returns the length of the string returned in
44 <parameter>infoLog</parameter> (excluding the null
45 terminator).</para>
46 </listitem>
47 </varlistentry>
48 <varlistentry>
49 <term><parameter>infoLog</parameter></term>
50 <listitem>
51 <para>Specifies an array of characters that is used
52 to return the information log.</para>
53 </listitem>
54 </varlistentry>
55 </variablelist>
56 </refsect1>
57 <refsect1 id="description"><title>Description</title>
58 <para><function>glGetShaderInfoLog</function> returns the
59 information log for the specified shader object. The information
60 log for a shader object is modified when the shader is compiled.
61 The string that is returned will be null terminated.</para>
62
63 <para><function>glGetShaderInfoLog</function> returns in
64 <parameter>infoLog</parameter> as much of the information log as
65 it can, up to a maximum of <parameter>maxLength</parameter>
66 characters. The number of characters actually returned,
67 excluding the null termination character, is specified by
68 <parameter>length</parameter>. If the length of the returned
69 string is not required, a value of <constant>NULL</constant> can
70 be passed in the <parameter>length</parameter> argument. The
71 size of the buffer required to store the returned information
72 log can be obtained by calling
73 <citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
74 with the value <constant>GL_INFO_LOG_LENGTH</constant>.</para>
75
76 <para>The information log for a shader object is a string that
77 may contain diagnostic messages, warning messages, and other
78 information about the last compile operation. When a shader
79 object is created, its information log will be a string of
80 length 0.</para>
81 </refsect1>
82 <refsect1 id="notes"><title>Notes</title>
83 <para><function>glGetShaderInfoLog</function> is available only
84 if the GL version is 2.0 or greater.</para>
85
86 <para>The information log for a shader object is the OpenGL
87 implementer's primary mechanism for conveying information about
88 the compilation process. Therefore, the information log can be
89 helpful to application developers during the development
90 process, even when compilation is successful. Application
91 developers should not expect different OpenGL implementations to
92 produce identical information logs.</para>
93 </refsect1>
94 <refsect1 id="errors"><title>Errors</title>
95 <para><constant>GL_INVALID_VALUE</constant> is generated if
96 <parameter>shader</parameter> is not a value generated by
97 OpenGL.</para>
98
99 <para><constant>GL_INVALID_OPERATION</constant> is generated if
100 <parameter>shader</parameter> is not a shader object.</para>
101
102 <para><constant>GL_INVALID_VALUE</constant> is generated if
103 <parameter>maxLength</parameter> is less than 0.</para>
104
105 <para><constant>GL_INVALID_OPERATION</constant> is generated if
106 <function>glGetShaderInfoLog</function> is executed between the
107 execution of
108 <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
109 and the corresponding execution of
110 <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
111 </refsect1>
112 <refsect1 id="associatedgets"><title>Associated Gets</title>
113 <para><citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
114 with argument <constant>GL_INFO_LOG_LENGTH</constant></para>
115
116 <para><citerefentry><refentrytitle>glIsShader</refentrytitle></citerefentry></para>
117 </refsect1>
118 <refsect1 id="seealso"><title>See Also</title>
119 <para><citerefentry><refentrytitle>glCompileShader</refentrytitle></citerefentry>,
120 <citerefentry><refentrytitle>glGetProgramInfoLog</refentrytitle></citerefentry>,
121 <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
122 <citerefentry><refentrytitle>glValidateProgram</refentrytitle></citerefentry></para>
123 </refsect1>
124 <refsect1 id="Copyright"><title>Copyright</title>
125 <para>
126 Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
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>