[Solved] iOS GLES 3.0

I’m getting error 1286 from PlatformClear:

GL_INVALID_FRAMEBUFFER_OPERATION, 0x0506
Given when doing anything that would attempt to read from or write/render to a framebuffer that is not complete.

Unhandled Exception:
Microsoft.Xna.Framework.Graphics.MonoGameGLException: GL.GetError() returned 1286
at Microsoft.Xna.Framework.Graphics.GraphicsExtensions.CheckGLError () [0x00030] in <2ed079e9f5554c6fbbc5b074c463b96c>:0
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformClear (Microsoft.Xna.Framework.Graphics.ClearOptions options, Microsoft.Xna.Framework.Vector4 color, System.Single depth, System.Int32 stencil) [0x0013a] in <2ed079e9f5554c6fbbc5b074c463b96c>:0
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Clear (Microsoft.Xna.Framework.Color color) [0x0001f] in <2ed079e9f5554c6fbbc5b074c463b96c>:0
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.ApplyRenderTargets (Microsoft.Xna.Framework.Graphics.RenderTargetBinding renderTargets) [0x000c5] in <2ed079e9f5554c6fbbc5b074c463b96c>:0
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Initialize () [0x000d3] in <2ed079e9f5554c6fbbc5b074c463b96c>:0
at Microsoft.Xna.Framewor
k.Graphics.GraphicsDevice…ctor (Microsoft.Xna.Framework.Graphics.GraphicsAdapter adapter, Microsoft.Xna.Framework.Graphics.GraphicsProfile graphicsProfile, Microsoft.Xna.Framework.Graphics.PresentationParameters presentationParameters) [0x001a0] in <2ed079e9f5554c6fbbc5b074c463b96c>:0

I also noticed that OpenGL.iOS tries to open the framework with path /System/Library/Frameworks/OpenGLES.framework/OpenGLES, whereas mine is located within the SDK at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/OpenGLES.framework, but changing this doesn’t seem to make a difference.

EDIT: The error comes from the final clear, even if none of the bits are set. So I’m assuming it really is an issue with the framebuffer, not the clear operation.