rendered paste bodyvoid PreparingDeviceSettingsCallback(object sender, PreparingDeviceSettingsEventArgs e)
{
e.GraphicsDeviceInformation.CreationOptions = CreateOptions.SinglePrecision & CreateOptions.HardwareVertexProcessing;
DisplayMode Mode = new DisplayMode();
foreach (DisplayMode D in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes)
{
Mode = D;
}
e.GraphicsDeviceInformation.PresentationParameters.BackBufferWidth = Mode.Width;
e.GraphicsDeviceInformation.PresentationParameters.BackBufferHeight = Mode.Height;
e.GraphicsDeviceInformation.PresentationParameters.BackBufferFormat = Mode.Format;
e.GraphicsDeviceInformation.PresentationParameters.FullScreenRefreshRateInHz = Mode.RefreshRate;
}