mono/MonoGame — pull request #1470 by kjpou1 (2013-02-27 14:17:36+00:00)
Title: Develop3d - Cleanup Frame Render buffers for RenderTargets

Delete Render buffers for each Render Target binding in SetRenderTargets when the render target is passed as null which signifies resetting the Render Target bindings.

This fixes a problem with multiple render targets with DepthFormats other than None. FrameRenderBuffers are generated but are not cleaned up (GL.DeleteRenderBuffers) after they are no longer used. If this is not done and another RenderTarget is attached that does not have the same size then the FrameBufferStatus is invalid with FramebufferIncompleteDimensions.