11 Brian Paul
(brian.paul 'at' tungstengraphics.com
)
12 Michal Krol
(mjkrol 'at' gmail.com
)
16 XXX
- Not complete yet
!!!
20 Last Modified Date
: July
30, 2006
22 $Date
: 2006/07/30 14:28:38 $ $Revision
: 1.2 $
30 OpenGL
1.0 is required.
32 The ARB_shader_objects extension is required.
34 The ARB_shading_language_100 extension is required.
36 The extension is written against the OpenGL
1.5 specification.
38 The extension is written against the OpenGL Shading Language
1.10
43 This extension introduces a debug object that can be attached to
44 a program object to
enable debugging. Vertex and
/or fragment shader
,
45 during execution
, issue diagnostic
function calls that are logged
46 to the debug object's log. A separate debug log
for each shader
type
47 is maintained. A debug object can be attached
, detached and queried
48 at any
time outside the Begin
/End pair. Multiple debug objects can
49 be attached to a single program object.
59 New Procedures and Functions
61 handleARB CreateDebugObjectMESA
(void
)
62 void ClearDebugLogMESA
(handleARB obj
, enum logType
, enum shaderType
)
63 void GetDebugLogMESA
(handleARB obj
, enum logType
, enum shaderType
,
64 sizei maxLength
, sizei
*length
,
66 sizei GetDebugLogLengthMESA
(handleARB obj
, enum logType
,
75 Returned by the
<params
> parameter of GetObjectParameter
{fi}vARB
:
77 DEBUG_OBJECT_MESA
0x8759
79 Accepted by the
<logType
> argument of ClearDebugLogMESA
,
80 GetDebugLogLengthMESA and GetDebugLogMESA
:
82 DEBUG_PRINT_MESA
0x875A
83 DEBUG_ASSERT_MESA
0x875B
85 Additions to Chapter
2 of the OpenGL
1.5 Specification
90 Additions to Chapter
3 of the OpenGL
1.5 Specification
(Rasterization
)
94 Additions to Chapter
4 of the OpenGL
1.5 Specification
(Per
-Fragment
95 Operations and the Frame Buffer
)
99 Additions to Chapter
5 of the OpenGL
1.5 Specification
104 Additions to Chapter
6 of the OpenGL
1.5 Specification
(State and State
109 Additions to Appendix A of the OpenGL
1.5 Specification
(Invariance
)
113 Additions to Chapter
1 of the OpenGL Shading Language
1.10 Specification
118 Additions to Chapter
2 of the OpenGL Shading Language
1.10 Specification
119 (Overview of OpenGL Shading
)
123 Additions to Chapter
3 of the OpenGL Shading Language
1.10 Specification
128 Additions to Chapter
4 of the OpenGL Shading Language
1.10 Specification
129 (Variables and Types
)
133 Additions to Chapter
5 of the OpenGL Shading Language
1.10 Specification
134 (Operators and Expressions
)
138 Additions to Chapter
6 of the OpenGL Shading Language
1.10 Specification
139 (Statements and Structure
)
143 Additions to Chapter
7 of the OpenGL Shading Language
1.10 Specification
148 Additions to Chapter
8 of the OpenGL Shading Language
1.10 Specification
151 Add a new section
8.10 "Debug Functions"
:
153 Debug functions are available to both fragment and vertex shaders.
154 They are used to track the execution of a shader by logging
155 passed
-in arguments to the debug object's log. Those values can be
156 retrieved by the application
for inspection after shader execution
159 The text
, if any
, produced by any of these functions is appended
160 to each debug object that is attached to the program object.
161 There are different debug log types
163 Add a new section
8.10.1 "Print Function"
:
165 The following printMESA prototypes are available.
167 void printMESA
(const float value
)
168 void printMESA
(const int value
)
169 void printMESA
(const bool value
)
170 void printMESA
(const vec2 value
)
171 void printMESA
(const vec3 value
)
172 void printMESA
(const vec4 value
)
173 void printMESA
(const ivec2 value
)
174 void printMESA
(const ivec3 value
)
175 void printMESA
(const ivec4 value
)
176 void printMESA
(const bvec2 value
)
177 void printMESA
(const bvec3 value
)
178 void printMESA
(const bvec4 value
)
179 void printMESA
(const mat2 value
)
180 void printMESA
(const mat3 value
)
181 void printMESA
(const mat4 value
)
182 void printMESA
(const sampler1D value
)
183 void printMESA
(const sampler2D value
)
184 void printMESA
(const sampler3D value
)
185 void printMESA
(const samplerCube value
)
186 void printMESA
(const sampler1DShadow value
)
187 void printMESA
(const sampler2DShadow value
)
189 The printMESA
function writes the argument
<value
> to the "debug
190 print log"
(XXX DEBUG_PRINT_MESA?
). Each component is written
in
191 text format
(XXX format
!) and is delimited by a white space
(XXX
1
194 Add a new section
8.10.2 "Assert Function"
:
196 The following assertMESA prototypes are available.
198 void assertMESA
(const bool condition
)
199 void assertMESA
(const bool condition
, const int cookie
)
200 void assertMESA
(const bool condition
, const int cookie
,
201 const int file
, const int line
)
203 The assertMESA
function checks
if the argument
<condition
> is
204 true or false. If it is true
, nothing happens. If it is false
,
205 a diagnostic message is written to the "debug assert log".
206 The message contains the argument
<file
>, <line
>, <cookie
> and
207 implementation dependent double
-quoted string
, each of this
208 delimited by a white space. If the argument
<cookie
> is not present
,
209 it is meant as
if it was of value
0. If the arguments
<file
> and
210 <line
> are not present
, they are meant as
if they were of values
211 __FILE__ and __LINE__
, respectively. The following three calls
212 produce the same output
, assuming they were issued from the same
216 assertMESA
(false
, 0);
217 assertMESA
(false
, 0, __FILE__
, __LINE__
);
219 The diagnostic message examples follow.
222 1 45 333 "all
(lessThanEqual
(fragColor
, vec4
(1.0)))"
223 1 66 1 "assertion failed
in file
1, line
66, cookie
1"
225 Additions to Chapter
9 of the OpenGL Shading Language
1.10 Specification
226 (Shading Language Grammar
)
230 Additions to Chapter
10 of the OpenGL Shading Language
1.10
231 Specification
(Issues
)
235 Additions to the AGL
/EGL
/GLX
/WGL Specifications
251 New Implementation Dependent State
262 Initial draft.
(Michal Krol
)
264 Add Overview
, New Procedures and Functions
, New Tokens sections.
265 Add sections
8.10.1, 8.10.2 to GLSL spec.