Пример #1
0
        public Main()
        {
            graphics = new GraphicsDeviceManager(this);

            crashHandler = new CrashHandler();

            //false for variable timestep, true for fixed
            Time.FixedTimeStep = true;
            Time.VSyncEnabled  = true;

            //MonoGame sets x32 MSAA by default if enabled
            //If enabled and we want a lower value, set the value in the PreparingDeviceSettings event
            graphics.SynchronizeWithVerticalRetrace = Time.VSyncEnabled;
            graphics.PreferMultiSampling            = true;

            //Allows for borderless full screen on DesktopGL
            graphics.HardwareModeSwitch = false;

            graphics.PreparingDeviceSettings -= OnPreparingDeviceSettings;
            graphics.PreparingDeviceSettings += OnPreparingDeviceSettings;
        }