OES_depth24
WebGL working group (public_webgl 'at' khronos.org)
Florian Boesch (pyalot 'at' gmail.com)
Members of the WebGL working group
Last modified date: February 05, 2015
Revision: 2
WebGL extension #NN
Written against the WebGL API 1.0 specification.
Promoted to core and no longer available as an extension in WebGL API 2.0 specification.
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:
[Exposed=(Window,Worker), LegacyNoInterfaceObject] interface OES_depth24 { const GLenum DEPTH_COMPONENT24_OES = 0x81A6; };
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 1, 2015/01/26
Revision 2, 2015/02/05