I have a Windows Forms control that I dug up which allowed XNA to render on a Windows form (I did not write the original control, SpinningTriangleControl was the name of it). I had migrated it over to Monogame some time ago and didn’t have any issues with it until earlier this week. Suddenly when instantiating the GraphicsDevice class, I get the following error:
Requested GraphicsMode not available. SetPixelFormat error: 2000
This is the code that produces it:
GraphicsAdapter adapter = GraphicsAdapter.DefaultAdapter;
GraphicsProfile profile = GraphicsProfile.HiDef;
PresentationParameters pp = new PresentationParameters()
{
DeviceWindowHandle = windowHandle,
BackBufferWidth = Math.Max(width, 1),
BackBufferHeight = Math.Max(height, 1),
};
graphicsDevice = new GraphicsDevice(adapter, profile, pp);
Or on Github if you’d prefer the full file.
the width and height variables are set to 240 and 256 respectively. I suspect this is actually a graphics driver issue as that’s about the only thing that has changed recently. I’m running a Radeon HD7870 with the Crimson 16.6.2 driver under Windows 7, Visual Studio Express 2013. This exception does not get thrown on my Windows 10 machine, running a Geforce 745 GT M, driver version 10.8.13.6472. This is a WindowsGL project.