All pastes #572979 Raw Edit

List Resolutions

public text v1 · immutable
·published 2007-06-17 23:19 UTC
rendered paste body
--- IN Constructor ---
Graphics.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs>(PreparingDeviceSettingsCallback);

--- Callback ---
        void PreparingDeviceSettingsCallback(object sender, PreparingDeviceSettingsEventArgs e)
        {
            e.GraphicsDeviceInformation.CreationOptions = CreateOptions.SinglePrecision & CreateOptions.HardwareVertexProcessing;

            foreach (DisplayMode Mode in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes)
            {
                // BLAH
            }
            
            // Use this to set the mode!
            //e.GraphicsDeviceInformation.PresentationParameters.BackBufferWidth = Mode.Width;
            //e.GraphicsDeviceInformation.PresentationParameters.BackBufferHeight = Mode.Height;
            //e.GraphicsDeviceInformation.PresentationParameters.BackBufferFormat = Mode.Format;
            //e.GraphicsDeviceInformation.PresentationParameters.FullScreenRefreshRateInHz = Mode.RefreshRate;
        }