mono/MonoGame — pull request #1549 by tomspilman (2013-03-16 02:03:40+00:00)
Title: RenderTarget3D for DirectX

Added support for new class `RenderTarget3D` which works similar to its 2D and Cube counterparts. This feature does not exist in XNA, but actually fits in pretty elegantly into the API.

- Added RenderTarget3D class with DX implementation.
- Added GraphicsDevice.SetRenderTarget(RenderTarget3D, arraySlice).
- Made RenderTargetBinding a little more generic to handle both cube and 3D textures.
- Fixed bug were Texture3D.Format was not set.

This should be portable to OpenGL desktop systems, but i'm not sure of OpenGL ES platforms.

Also this currently only works by selecting the depth layer to render into on the CPU side via `GraphicsDevice.SetRenderTarget`. Eventually when we support geometry shaders in MGFX we can also do this on the GPU.