mono/MonoGame — pull request #1468 by kjpou1 (2013-02-27 12:55:27+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.