Turns out that the way to do this programmatically is to set the GraphicsMode
property in the CreateFrameBuffer()
override of your class inheriting from AndroidGameView
:
protected override void CreateFrameBuffer()
{
// Create a graphics context for OpenGL ES 2.0
ContextRenderingApi = GLVersion.ES2;
// Set the graphics mode to use 32bpp colour format, 24bpp depth, 8bpp stencil and 4x MSAA
GraphicsMode = new GraphicsMode(new ColorFormat(32), 24, 8, 4);
// Create the frame buffer itself by calling the base class method
base.CreateFrameBuffer();
// Custom initialization code here
}
Thanks to Cheesebaron for leading me down the path of looking into the GraphicsMode
property of AndroidGameView
.