mono/MonoGame — pull request #1082 by RayBatts (2012-12-14 21:51:47+00:00)
Title: Removed PreserveFrameBuffer workaround

First off, apologies about the name of the branch being pulled in. I originally thought the problem I was running into was related to poor handling of multiple views.

This PR removes the PreserveFrameBuffer workaround that was introduced a couple of months ago. WillMoveToWindow was destroying our framebuffer object. This gets called when the application starts, and when we present any kind of modal view, such as the keyboard or an advertisement. The whole implementation of WillMoveToWindow has been removed, as I don't believe we need it. LayoutSubviews destroys and recreates our framebuffer as the view's recalculated, but destroying the FBO when we present a modal view only leads to crashes as we yank the FBO from under the graphics device.

Test:
Remove the PreserveFrameBuffer bool from iOSGameView and all references to it.
Start the app/game up.
Use something like Guide.BeginShowKeyboardInput().
App will either crash or throw a GL exception.