flibitijibibo/MonoGame — pull request #227 by nickgravelyn (2014-05-23 22:48:44+00:00)
Title: Fixing OpenGL warnings about redundant state in glBindFramebuffer

When running in debug mode, there are a lot of GL errors printing to the console regarding redundant state changes in glBindFramebuffer. I've added some managed caching of the two framebuffer components and made helpers that make sure we're doing the right thing.

You can see all of the debug output with a blank game that does nothing but clears and presents. Applying this removes all the debug output. From the OpenGL docs and my own game it doesn't seem to have caused any issues so it seems like it's a solid solution, though admittedly I may have missed some use case somewhere.