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=
"glGetDebugMessageLog">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glGetDebugMessageLog
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glGetDebugMessageLog
</refname>
17 <refpurpose>retrieve messages from the debug message log
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>GLuint
<function>glGetDebugMessageLog
</function></funcdef>
23 <paramdef>GLuint
<parameter>count
</parameter></paramdef>
24 <paramdef>GLsizei
<parameter>bufSize
</parameter></paramdef>
25 <paramdef>GLenum *
<parameter>sources
</parameter></paramdef>
26 <paramdef>Glenum *
<parameter>types
</parameter></paramdef>
27 <paramdef>GLuint *
<parameter>ids
</parameter></paramdef>
28 <paramdef>GLenum *
<parameter>severities
</parameter></paramdef>
29 <paramdef>GLsizei *
<parameter>lengths
</parameter></paramdef>
30 <paramdef>GLchar *
<parameter>messageLog
</parameter></paramdef>
34 <refsect1 id=
"parameters"><title>Parameters
</title>
37 <term><parameter>count
</parameter></term>
40 The number of debug messages to retrieve from the log.
45 <term><parameter>bufSize
</parameter></term>
48 The size of the buffer whose address is given by
<parameter>messageLog
</parameter>.
53 <term><parameter>sources
</parameter></term>
56 The address of an array of variables to receive the sources of the retrieved messages.
61 <term><parameter>types
</parameter></term>
64 The address of an array of variables to receive the types of the retrieved messages.
69 <term><parameter>ids
</parameter></term>
72 The address of an array of unsigned integers to receive the ids of the retrieved messages.
77 <term><parameter>severities
</parameter></term>
80 The address of an array of variables to receive the severites of the retrieved messages.
85 <term><parameter>lengths
</parameter></term>
88 The address of an array of variables to receive the lengths of the received messages.
93 <term><parameter>messageLog
</parameter></term>
96 The address of an array of characters that will receive the messages.
102 <refsect1 id=
"description"><title>Description
</title>
104 <function>glGetDebugMessageLog
</function> retrieves messages from the debug message log. A maximum of
105 <parameter>count
</parameter> messages are retrieved from the log. If
<parameter>sources
</parameter>
106 is not NULL then the source of each message is written into up to
<parameter>count
</parameter> elements
107 of the array. If
<parameter>types
</parameter>
108 is not NULL then the type of each message is written into up to
<parameter>count
</parameter> elements
109 of the array. If
<parameter>id
</parameter>
110 is not NULL then the identifier of each message is written into up to
<parameter>count
</parameter> elements
111 of the array. If
<parameter>severities
</parameter>
112 is not NULL then the severity of each message is written into up to
<parameter>count
</parameter> elements
113 of the array. If
<parameter>lengths
</parameter>
114 is not NULL then the length of each message is written into up to
<parameter>count
</parameter> elements
118 <parameter>messageLog
</parameter> specifies the address of a character array into which the debug messages
119 will be written. Each message will be concatenated onto the array starting at the first element of
<parameter>messageLog
</parameter>.
120 <parameter>bufSize
</parameter> specifies the size of the array
<parameter>messageLog
</parameter>. If a message will not
121 fit into the remaining space in
<parameter>messageLog
</parameter> then the function terminates and returns the number
122 of messages written so far, which may be zero.
125 If
<function>glGetDebugMessageLog
</function> returns zero then no messages are present in the debug log, or there
126 was not enough space in
<parameter>messageLog
</parameter> to retrieve the first message in the queue. If
<parameter>messageLog
</parameter>
127 is NULL then no messages are written and the value of
<parameter>bufSize
</parameter> is ignored.
130 <refsect1 id=
"notes"><title>Notes
</title>
132 Although debug messages may be enabled in a non-debug context, the quantity and detail of such messages may be substantially
133 inferior to those in a debug context. In particular, a valid implementation of the debug message queue in a non-debug context
134 may produce no messages at all.
137 <refsect1 id=
"errors"><title>Errors
</title>
139 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>count
</parameter> or
<parameter>bufSize
</parameter> is negative.
142 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
144 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_DEBUG_LOGGED_MESSAGES
</constant>
147 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH
</constant>
150 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_MAX_DEBUG_MESSAGE_LENGTH
</constant>
153 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_MAX_DEBUG_LOGGED_MESSAGES
</constant>
156 <refsect1 id=
"seealso"><title>See Also
</title>
158 <citerefentry><refentrytitle>glDebugMessageInsert
</refentrytitle></citerefentry>,
159 <citerefentry><refentrytitle>glDebugMessageCallback
</refentrytitle></citerefentry>,
160 <citerefentry><refentrytitle>glDebugMessageControl
</refentrytitle></citerefentry>.
163 <refsect1 id=
"Copyright"><title>Copyright
</title>
165 Copyright
<trademark class=
"copyright"></trademark> 2012 Khronos Group.
166 This material may be distributed subject to the terms and conditions set forth in
167 the Open Publication License, v
1.0,
8 June
1999.
168 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.