update upstream sources
[clinton/guile-figl.git] / upstream-doc / man4 / glDebugMessageControl.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="glDebugMessageControl">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2012</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glDebugMessageControl</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glDebugMessageControl</refname>
17 <refpurpose>control the reporting of debug messages in a debug context</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glDebugMessageControl</function></funcdef>
23 <paramdef>GLenum <parameter>source</parameter></paramdef>
24 <paramdef>GLenum <parameter>type</parameter></paramdef>
25 <paramdef>GLenum <parameter>severity</parameter></paramdef>
26 <paramdef>GLsizei <parameter>count</parameter></paramdef>
27 <paramdef>const GLuint *<parameter>ids</parameter></paramdef>
28 <paramdef>GLboolean <parameter>enabled</parameter></paramdef>
29 </funcprototype>
30 </funcsynopsis>
31 </refsynopsisdiv>
32 <refsect1 id="parameters"><title>Parameters</title>
33 <variablelist>
34 <varlistentry>
35 <term><parameter>source</parameter></term>
36 <listitem>
37 <para>
38 The source of debug messages to enable or disable.
39 </para>
40 </listitem>
41 </varlistentry>
42 <varlistentry>
43 <term><parameter>type</parameter></term>
44 <listitem>
45 <para>
46 The type of debug messages to enable or disable.
47 </para>
48 </listitem>
49 </varlistentry>
50 <varlistentry>
51 <term><parameter>severity</parameter></term>
52 <listitem>
53 <para>
54 The severity of debug messages to enable or disable.
55 </para>
56 </listitem>
57 </varlistentry>
58 <varlistentry>
59 <term><parameter>count</parameter></term>
60 <listitem>
61 <para>
62 The length of the array <parameter>ids</parameter>.
63 </para>
64 </listitem>
65 </varlistentry>
66 <varlistentry>
67 <term><parameter>ids</parameter></term>
68 <listitem>
69 <para>
70 The address of an array of unsigned integers contianing the ids of the messages to enable or disable.
71 </para>
72 </listitem>
73 </varlistentry>
74 <varlistentry>
75 <term><parameter>enabled</parameter></term>
76 <listitem>
77 <para>
78 A Boolean flag determining whether the selected messages should be enabled or disabled.
79 </para>
80 </listitem>
81 </varlistentry>
82 </variablelist>
83 </refsect1>
84 <refsect1 id="description"><title>Description</title>
85 <para>
86 <function>glDebugMessageControl</function> controls the reporting of debug messages generated by a debug
87 context. The parameters <parameter>source</parameter>, <parameter>type</parameter> and <parameter>severity</parameter>
88 form a filter to select messages from the pool of potential messages generated by the GL.
89 </para>
90 <para>
91 <parameter>source</parameter> may be <constant>GL_DEBUG_SOURCE_API</constant>, <constant>GL_DEBUG_SOURCE_WINDOW_SYSTEM_</constant>,
92 <constant>GL_DEBUG_SOURCE_SHADER_COMPILER</constant>, <constant>GL_DEBUG_SOURCE_THIRD_PARTY</constant>,
93 <constant>GL_DEBUG_SOURCE_APPLICATION</constant>, <constant>GL_DEBUG_SOURCE_OTHER</constant> to select messages generated by
94 usage of the GL API, the window system, the shader compiler, third party tools or libraries, explicitly by the application
95 or by some other source, respectively. It may also take the value <constant>GL_DONT_CARE</constant>. If <parameter>source</parameter>
96 is not <constant>GL_DONT_CARE</constant> then only messages whose source matches <parameter>source</parameter> will be referenced.
97 </para>
98 <para>
99 <parameter>type</parameter> may be one of <constant>GL_DEBUG_TYPE_ERROR</constant>, <constant>GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR</constant>,
100 <constant>GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR</constant>, <constant>GL_DEBUG_TYPE_PORTABILITY</constant>,
101 <constant>GL_DEBUG_TYPE_PERFORMANCE</constant>, <constant>GL_DEBUG_TYPE_MARKER</constant>, <constant>GL_DEBUG_TYPE_PUSH_GROUP</constant>,
102 <constant>GL_DEBUG_TYPE_POP_GROUP</constant>, or <constant>GL_DEBUG_TYPE_OTHER</constant> to indicate the type of messages describing
103 GL errors, attempted use of deprecated features, triggering of undefined behavior, portability issues, performance notifications, markers,
104 group push and pop events, and other
105 types of messages, respectively. It may also take the value <constant>GL_DONT_CARE</constant>. If <parameter>type</parameter> is not <constant>GL_DONT_CARE</constant>
106 then only messages whose type matches <parameter>type</parameter> will be referenced.
107 </para>
108 <para>
109 <parameter>severity</parameter> may be one of <constant>GL_DEBUG_SEVERITY_LOW</constant>, <constant>GL_DEBUG_SEVERITY_MEDIUM</constant>,
110 or <constant>GL_DEBUG_SEVERITY_HIGH</constant> to select messages of low, medium or high severity messages or to
111 <constant>GL_DEBUG_SEVERITY_NOTIFICATION</constant> for notifications. It may also take the
112 value <constant>GL_DONT_CARE</constant>. If <parameter>severity</parameter> is not <constant>GL_DONT_CARE</constant> then only
113 messages whose severity matches <parameter>severity</parameter> will be referenced.
114 </para>
115 <para>
116 <parameter>ids</parameter> contains a list of <parameter>count</parameter> message identifiers to select specific messages from the pool
117 of available messages. If <parameter>count</parameter> is zero then the value of <parameter>ids</parameter> is ignored. Otherwise,
118 only messages appearing in this list are selected. In this case, <parameter>source</parameter> and <parameter>type</parameter>
119 may not be <constant>GL_DONT_CARE</constant> and <parameter>severity</parameter> must be <constant>GL_DONT_CARE</constant>.
120 </para>
121 <para>
122 If <parameter>enabled</parameter> is <constant>GL_TRUE</constant> then messages that match the filter formed by
123 <parameter>source</parameter>, <parameter>type</parameter>, <parameter>severity</parameter> and <parameter>ids</parameter>
124 are enabled. Otherwise, those messages are disabled.
125 </para>
126 </refsect1>
127 <refsect1 id="notes"><title>Notes</title>
128 <para>
129 Although debug messages may be enabled in a non-debug context, the quantity and detail of such messages may be substantially
130 inferior to those in a debug context. In particular, a valid implementation of the debug message queue in a non-debug context
131 may produce no messages at all.
132 </para>
133 <para>
134 <constant>GL_DEBUG_TYPE_MARKER</constant>, <constant>GL_DEBUG_TYPE_PUSH_GROUP</constant>, <constant>GL_DEBUG_TYPE_POP_GROUP</constant>, and <constant>GL_DEBUG_SEVERITY_NOTIFICATION</constant>
135 are available only if the GL version is 4.3 or higher.
136 </para>
137 </refsect1>
138 <refsect1 id="errors"><title>Errors</title>
139 <para>
140 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>count</parameter> is negative.
141 </para>
142 <para>
143 <constant>GL_INVALID_ENUM</constant> is generated if any of <parameter>source</parameter>, <parameter>type</parameter>
144 or <parameter>severity</parameter> is not one of the accepted interface types.
145 </para>
146 <para>
147 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>count</parameter> is non-zero
148 and either <parameter>source</parameter> or <parameter>type</parameter> is <constant>GL_DONT_CARE</constant>
149 or if <parameter>severity</parameter> is not <constant>GL_DONT_CARE</constant>.
150 </para>
151 </refsect1>
152 <refsect1 id="seealso"><title>See Also</title>
153 <para>
154 <citerefentry><refentrytitle>glDebugMessageInsert</refentrytitle></citerefentry>,
155 <citerefentry><refentrytitle>glDebugMessageCallback</refentrytitle></citerefentry>,
156 <citerefentry><refentrytitle>glGetDebugMessageLog</refentrytitle></citerefentry>.
157 </para>
158 </refsect1>
159 <refsect1 id="Copyright"><title>Copyright</title>
160 <para>
161 Copyright <trademark class="copyright"></trademark> 2012 Khronos Group.
162 This material may be distributed subject to the terms and conditions set forth in
163 the Open Publication License, v 1.0, 8 June 1999.
164 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
165 </para>
166 </refsect1>
167 </refentry>