OpenRA/OpenRA — pull request #3407 by pchote (2013-06-15 08:03:01+00:00)
Title: Voxel refactoring

This changes the voxel renderer to draw via a framebuffer into a texture, which are composited with the world as sprites. This removes all of the stencil/depth buffer clears and allows shadows to done without a special shader.

Summary of important changes:

* Adds FBO / render-to-texture support to Graphics.SdlCommon (minspec now requires GL_ARB_framebuffer_object).
* Allows texture data to be read back from the GPU.
* Adds a geometry visualization debug layer.
* Supports sprites with a built-in render offset (implements half of #3287).
* Removes nearest-pixel position rounding from SpriteRenderer - things that need this have plenty of opportunity to round themselves beforehand.
* Introduces a BeforeRender method on IRenderable.
* Exposes alpha blending to renderer code (was previously hardcoded on).
* Removes stencil buffer support.
* Other refactoring to support the above.

A future patch will be able to cache sprites based on the input arguments to give a serious perf win for large groups of units, but that can wait until we actually need it.

Screenshot of the geometry visualization:
![renderdebug](https://f.cloud.github.com/assets/167819/657828/439c51e4-d58f-11e2-8ed1-6975c8f299a5.png)