Name ANGLE_translated_shader_source Name Strings GL_ANGLE_translated_shader_source Contributors Daniel Koch, TransGaming Inc. Gregg Tavares, Google Inc. Kenneth Russell, Google Inc. Zhenyao Mo, Google Inc. Contact Zhenyao Mo, Google Inc. (zmo 'at' google 'dot' com) Status Implemented in ANGLE ES2 Version Last Modified Date: October 5, 2011 Author Revision: 2 Number OpenGL ES Extension #113 Dependencies OpenGL ES 2.0 is required. The extension is written against the OpenGL ES 2.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 purposes, it is useful to be able to examine the shader after translation. This extension addes a new function to query the translated shader source, and adds a new enum for GetShaderiv's parameter to query the translated shader source length. IP Status No known IP claims. New Types None New Procedures and Functions void GetTranslatedShaderSourceANGLE(uint shader, sizei bufsize, sizei* length, char* source); New Tokens Accepted by the parameter of GetShaderiv: TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0 Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State Requests) Append in the end of the fourth paragraph of section 6.1.8 (Shader and Program Queries): " If is TRANSLATED_SHADER_LENGTH_ANGLE, the length of the translated source string, including a null terminator, is returned. If no source has been defined, CompileShader has not been called, or the translation has failed for , zero is returned." Append after the last paragraph of section 6.1.8 (Shader and Program Queries): "The command void GetTranslatedShaderSourceANGLE( uint shader, sizei bufSize, sizei *length, char *source ); returns in the string making up the translated source code for the shader object . The string will be null terminated. The actual number of characters written into , excluding the null terminator, is returned in . If is NULL, no length is returned. The maximum number of characters that may be written into , including the null terminator, is speciļ¬ed by . The string is the translated string of a concatenation of the strings passed to the GL using ShaderSource. The length of this translated string is given by TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE, which can be queried with GetShaderiv. If no source has been defined, CompileShader has not been called, or the translation has failed for , zero is returned for , and an empty string is returned for . If the value of SHADER_COMPILER is not TRUE, then the error INVALID_- OPERATION is generated." Issues 1) What enum value should be used for TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE? RESOLVED: The first draft used a temporary enum value. This been replaced with a enum allocated from the ANGLE range of GL enums. Revision History Revision 1, 2011/09/29, zmo - first draft Revision 2, 2011/10/05, dgkoch - assigned enum