WebGL
Khronos
 

WebGL OES_depth24 Extension Rejected Specification

Name

OES_depth24

Contact

WebGL working group (public_webgl 'at' khronos.org)

Contributors

Florian Boesch (pyalot 'at' gmail.com)

Members of the WebGL working group

Version

Last modified date: February 05, 2015
Revision: 2

Number

WebGL extension #NN

Dependencies

Written against the WebGL API 1.0 specification.

Promoted to core and no longer available as an extension in WebGL API 2.0 specification.

Overview

This extension exposes the OES_depth24 functionality to WebGL.

There are no WebGL-specific behavioral changes.

Consult the above extension for documentation, issues and new functions and enumerants.

When this extension is enabled:

IDL

[NoInterfaceObject]
interface OES_depth24 {
  const GLenum DEPTH_COMPONENT24_OES = 0x81A6;
};
  

Sample Code

        var extension = gl.getExtension('OES_depth24');
        if(extension !=== null){
            var depth = gl.createRenderbuffer();
            gl.bindRenderbuffer(gl.RENDERBUFFER, depth);
            gl.renderbufferStorage(gl.RENDERBUFFER, extension.DEPTH_COMPONENT24_OES, 128, 128);
            gl.bindRenderbuffer(gl.RENDERBUFFER, null);

            var fbo = gl.createFramebuffer();
            gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
            gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, depth);
            
            var fboStatus = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
            console.assert(fboStatus == gl.FRAMEBUFFER_COMPLETE, 'Framebuffer is not complete');

            gl.bindFramebuffer(gl.FRAMEBUFFER, null);
            console.assert(gl.getError() == gl.NO_ERROR, 'A GL error occured');
        }
    

Revision History

Revision 1, 2015/01/26

Revision 2, 2015/02/05