WebGL
Khronos
 

WebGL WEBGL_debug_shaders Khronos Ratified Extension Specification

Name

WEBGL_debug_shaders

Contact

zmo@chromium.org

Contributors

Members of the WebGL working group

Version

Last modified date: January 28, 2014
Revision: 7

Number

WebGL extension #7

Dependencies

Written against the WebGL API 1.0 specification.

Overview

WebGL uses the GLSL ES 2.0 spec on all platforms, and translates these shaders to the host platform's native language (HLSL, GLSL, and even GLSL ES). For debugging purpose, it is useful to be able to examine the shader after translation. This extension exposes a new function getTranslatedShaderSource for such purposes.

IDL

interface WEBGL_debug_shaders {

      DOMString getTranslatedShaderSource(WebGLShader shader);

};
  

New Functions

DOMString getTranslatedShaderSource(WebGLShader shader)
If no source has been defined, compileShader() has not been called, or the translation has failed for shader, an empty string is returned; otherwise, return the translated source.

Issues

1) Should this extension be made available on ordinary web pages?

Revision History

Revision 1, 2011/10/03

Revision 2, 2011/10/14

Revision 3, 2011/10/18

Revision 4, 2011/12/07

Revision 5, 2012/01/03

Revision 6, 2013/05/15

Revision 7, 2014/01/28