WEBGL_debug WebGL working group (public_webgl 'at' khronos.org) Emmanuel Gil Peyrot, Collabora Ltd. Members of the WebGL working group NN

This extension allows the GL to notify applications when various events occur that may be useful during application development, debugging and profiling.

References to debug contexts are deleted. References to the debug message log and callback are deleted, replaced with DOM events. The ObjectPtrLabel and GetObjectPtrLabel functions are replaced with ObjectLabel and GetObjectLabel. The count and ids arguments of DebugMessageControl are replaced with a sequence<GLuint> ids argument. The length and buf arguments of DebugMessageInsert and PushDebugGroup are replaced with a DOMString message argument. The identifier and name arguments of ObjectLabel and GetObjectLabel are replaced with a WebGLObject object argument. The length and label arguments of ObjectLabel are replaced with a DOMString label argument. The bufSize, length and label arguments of GetObjectLabel are replaced with a DOMString return type. As per the usual WebGL binding rules, functions don’t keep the KHR suffix they have in the GLES version, but tokens do. The WEBGL_debug extension object is a DOM EventTarget, obeying the rules of the DOM Level 3 Events, with a new WebGLDebugMessage event that gets fired whenever the driver, browser or application emits a debug message. debugMessageInsertKHR is exposed to allow the application to insert debug messages into the WebGL stream. objectLabelKHR and getObjectLabelKHR are exposed, to assign a label to a WebGLObject and retrieve it. pushDebugGroupKHR and popDebugGroupKHR make it possible to group a list of WebGL calls together. debugMessageControlKHR allows the application to enable and disable the debug messages which emit a WebGLDebugMessage event. This state is part of the debug group they are part of, and gets poped on popDebugGroupKHR.
ids, boolean enabled); void debugMessageInsertKHR(GLenum source, GLenum type, GLuint id, GLenum severity, DOMString buf); void pushDebugGroupKHR(GLenum source, GLuint id, DOMString message); void popDebugGroupKHR(); void objectLabelKHR(WebGLObject? object, DOMString label); DOMString getObjectLabelKHR(WebGLObject? object); }; // interface WEBGL_debug [NoInterfaceObject] interface WebGLDebugMessage : Event { readonly attribute GLenum source; readonly attribute GLenum type; readonly attribute GLuint id; readonly attribute GLenum severity; readonly attribute DOMString message; }; // interface WebGLDebugMessage ]]>

On WEBGL_debug:

Enables or disables the reporting of WebGLDebugMessage events for the specified messages. Inserts a custom message into the debug log. Pushes a debug group on the stack. Closes a group opened with pushDebugGroupKHR. Assigns a label to a WebGLObject. Retrieves the label associated with a WebGLObject. Register an event handler of a specific event type on the EventTarget. Removes an event listener from the EventTarget. Dispatch an event to this EventTarget.
Common initialization of the extension, with an example of debug message reporting.
Skip a section of the code.
Only output a subsection of the code and disable some messages for the entire application.
Initial revision.