Beispiel #1
0
 private void OnPreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs settings)
 {
     settings.GraphicsDeviceInformation.GraphicsProfile = FeatureLevel.Level_11_0;
     settings.GraphicsDeviceInformation.PresentationParameters.BackBufferWidth = WindowWidth;
     settings.GraphicsDeviceInformation.PresentationParameters.BackBufferHeight = WindowHeight;
     settings.GraphicsDeviceInformation.PresentationParameters.MultiSampleCount = MSAALevel.X8;
     settings.GraphicsDeviceInformation.PresentationParameters.RefreshRate = new Rational(144, 1);
 }
Beispiel #2
0
 protected virtual void OnPreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs args)
 {
     RaiseEvent(PreparingDeviceSettings, sender, args);
 }
Beispiel #3
0
 protected virtual void OnPreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs args)
 {
     var handler = PreparingDeviceSettings;
     if (handler != null)
     {
         handler(sender, args);
     }
 }
        //  Used to set desired antialiasing type. Doesn't check if type is available. We assume that
        //  m_antiAliasingType contains only valid types. And they are if ther were obtained from GetAvailableAntiAliasingTypes()
        static void GraphicsDeviceManager_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
        {
            MyMwcLog.WriteLine("MyVideoModeManager.GraphicsPreparingDeviceSettings - START");
            MyMwcLog.IncreaseIndent();

            //  This is for enabling profiling in NVIDIA PerfHUD. It's compiled only for developer build. We don't want it in release build.
            if (MyMwcFinalBuildConstants.ENABLE_PERFHUD == true)
            {      /*
                foreach (GraphicsAdapter adapter in GraphicsAdapter.Adapters)
                {
                    MyMwcLog.WriteLine(adapter.Description.Description);
                    if (adapter.Description.Description.Contains("PerfHUD"))
                    {
                        e.GraphicsDeviceInformation.Adapter = adapter;
                        //GraphicsAdapter.UseReferenceDevice = true;
                        break;
                    }
                }    */
            }
                                /*
            MyMwcLog.WriteLine("GraphicsDeviceInformation.PresentationParameters.MultiSampleCount: " + e.GraphicsDeviceInformation.PresentationParameters.MultiSampleCount);
            MyMwcLog.WriteLine("GraphicsDeviceInformation.PresentationParameters.PresentationInterval: " + e.GraphicsDeviceInformation.PresentationParameters.PresentationInterval);
            //MyMwcLog.WriteLine("GraphicsDeviceInformation.PresentationParameters.DisplayOrientation: " + e.GraphicsDeviceInformation.PresentationParameters.DisplayOrientation);
            MyMwcLog.WriteLine("GraphicsDeviceInformation.PresentationParameters.RenderTargetUsage: " + e.GraphicsDeviceInformation.PresentationParameters.RenderTargetUsage);
            MyMwcLog.WriteLine("GraphicsDeviceInformation.PresentationParameters.DepthStencilFormat: " + e.GraphicsDeviceInformation.PresentationParameters.DepthStencilFormat);
            MyMwcLog.WriteLine("GraphicsDeviceInformation.PresentationParameters.IsFullScreen: " + e.GraphicsDeviceInformation.PresentationParameters.IsFullScreen);
            MyMwcLog.WriteLine("GraphicsDeviceInformation.PresentationParameters.BackBufferWidth: " + e.GraphicsDeviceInformation.PresentationParameters.BackBufferWidth);
            MyMwcLog.WriteLine("GraphicsDeviceInformation.PresentationParameters.BackBufferHeight: " + e.GraphicsDeviceInformation.PresentationParameters.BackBufferHeight);
            MyMwcLog.WriteLine("GraphicsDeviceInformation.PresentationParameters.BackBufferFormat: " + e.GraphicsDeviceInformation.PresentationParameters.BackBufferFormat);
            //MyMwcLog.WriteLine("GraphicsDeviceInformation.PresentationParameters.Bounds: " + e.GraphicsDeviceInformation.PresentationParameters.b.Bounds);
            MyMwcLog.WriteLine("GraphicsDeviceInformation.PresentationParameters.RenderTargetUsage: " + e.GraphicsDeviceInformation.PresentationParameters.RenderTargetUsage);
                              */
            MyMwcLog.DecreaseIndent();
            MyMwcLog.WriteLine("MyVideoModeManager.GraphicsPreparingDeviceSettings - END");
        }
Beispiel #5
0
 private void HandlePreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
 {
     // override the current graphics adapter
     if (currentMode != null)
         e.GraphicsDeviceInformation.Adapter = currentMode.Adapter;
 }
Beispiel #6
0
 private void HandlePreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
 {
     var info = e.GraphicsDeviceInformation;
     // uncomment this line to use the WARP adapter
     //info.Adapter = AdapterSelector.FintMatchingWarpAdapter();
     info.DeviceCreationFlags |= DeviceCreationFlags.BgraSupport | DeviceCreationFlags.Debug;
 }