| 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <rejected href="rejected/OES_depth24/"> |
| 3 | <name>OES_depth24</name> |
| 4 | |
| 5 | <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL |
| 6 | working group</a> (public_webgl 'at' khronos.org) </contact> |
| 7 | |
| 8 | <contributors> |
| 9 | <contributor>Florian Boesch (pyalot 'at' gmail.com)</contributor> |
| 10 | <contributor>Members of the WebGL working group</contributor> |
| 11 | </contributors> |
| 12 | |
| 13 | <number>NN</number> |
| 14 | |
| 15 | <depends> |
| 16 | <api version="1.0"/> |
| 17 | <core version="2.0" /> |
| 18 | </depends> |
| 19 | |
| 20 | <overview> |
| 21 | <mirrors href="https://www.khronos.org/registry/gles/extensions/OES/OES_depth24.txt" |
| 22 | name="OES_depth24"> |
| 23 | </mirrors> |
| 24 | |
| 25 | <features> |
| 26 | <feature> |
| 27 | Allows 24-bit depth components as a valid render buffer storage format. |
| 28 | </feature> |
| 29 | </features> |
| 30 | </overview> |
| 31 | |
| 32 | <idl xml:space="preserve"> |
| 33 | [NoInterfaceObject] |
| 34 | interface OES_depth24 { |
| 35 | const GLenum DEPTH_COMPONENT24_OES = 0x81A6; |
| 36 | }; |
| 37 | </idl> |
| 38 | |
| 39 | <samplecode xml:space="preserve"> |
| 40 | <pre> |
| 41 | var extension = gl.getExtension('OES_depth24'); |
| 42 | if(extension !=== null){ |
| 43 | var depth = gl.createRenderbuffer(); |
| 44 | gl.bindRenderbuffer(gl.RENDERBUFFER, depth); |
| 45 | gl.renderbufferStorage(gl.RENDERBUFFER, extension.DEPTH_COMPONENT24_OES, 128, 128); |
| 46 | gl.bindRenderbuffer(gl.RENDERBUFFER, null); |
| 47 | |
| 48 | var fbo = gl.createFramebuffer(); |
| 49 | gl.bindFramebuffer(gl.FRAMEBUFFER, fbo); |
| 50 | gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, depth); |
| 51 | |
| 52 | var fboStatus = gl.checkFramebufferStatus(gl.FRAMEBUFFER); |
| 53 | console.assert(fboStatus == gl.FRAMEBUFFER_COMPLETE, 'Framebuffer is not complete'); |
| 54 | |
| 55 | gl.bindFramebuffer(gl.FRAMEBUFFER, null); |
| 56 | console.assert(gl.getError() == gl.NO_ERROR, 'A GL error occured'); |
| 57 | } |
| 58 | </pre> |
| 59 | </samplecode> |
| 60 | |
| 61 | <history> |
| 62 | <revision date="2015/01/26"> |
| 63 | <change>Initial revision.</change> |
| 64 | </revision> |
| 65 | <revision date="2015/02/05"> |
| 66 | <change>Moved to rejected because WEBGL_depth_texture can be used as a workaround for 24-bit depth for FBOs.</change> |
| 67 | </revision> |
| 68 | </history> |
| 69 | </rejected> |