EXT_sRGB WebGL working group (public_webgl 'at' khronos.org) Florian Boesch (pyalot 'at' gmail.com) Members of the WebGL working group 17 Additional format restrictions apply for CopyTexImage2D Adds the sRGB support to textures and framebuffer objects. [NoInterfaceObject] interface EXT_sRGB { const GLenum SRGB_EXT = 0x8C40; const GLenum SRGB_ALPHA_EXT = 0x8C42; const GLenum SRGB8_ALPHA8_EXT = 0x8C43; const GLenum FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210; }; Accepted by the format and internalformat parameters: SRGB_EXT and SRGB_ALPHA_EXT Accepted by the format parameter: SRGB_EXT and SRGB_ALPHA_EXT Accepted by the internalformat parameter: SRGB_ALPHA8_EXT Accepted by the pname parameter: FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT
        var ext = gl.getExtension('EXT_sRGB');
        var texture = gl.createTexture();
        gl.bindTexture(gl.TEXTURE_2D, texture);
        texImage2D(gl.TEXTURE_2D, 0, ext.SRGB_EXT, 256, 256, 0, ext.SRGB_EXT, gl.UNSIGNED_BYTE, data);
    
Initial revision. Moved from proposal to draft Moved from draft to community approved Added NoInterfaceObject extended attribute.