AnalyticalGraphicsInc/cesium — pull request #173 by pjcozzi (2012-08-22 20:30:59+00:00)
Title: Renderer support for WEBGL_depth_texture

This adds support for [WEBGL_depth_texture](http://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/), which is the foundation for the depth-based screen-space rendering techniques @IanLilleyT and I did in the hackathon - depth of field, fog, and ambient occlusion.

This extension is only available in Canary, so test in both stable and Canary.

The meat of this change is really a few new `PixelDatatype` and `PixelFormat` enums, and new `Framebuffer` functions to attach depth and depth-stencil textures. However, I also added a lot (but not all) of doc to `CubeMap` and `Framebuffer`, and introduced `CubeMapFace` to aid in doc and cleanup some of the code.

Once there is widespread and stable support for depth textures, I plan on removing support for renderbuffers. They are redundant and, to be technical, worthless. As we add support for more extensions (*cough* compressed textures *cough*), I will also cleanup the way extensions are accessed through the `Context`.