Beispiel #1
0
        protected override void OnInitialize()
        {
            var settings = new DeviceSettings9 {
                AdapterOrdinal = 0,
                CreationFlags  = CreateFlags.HardwareVertexProcessing,
                Width          = WindowWidth,
                Height         = WindowHeight
            };

            InitializeDevice(settings);
        }
Beispiel #2
0
        protected override void OnInitializeDevice()
        {
            Form.ClientSize = new Size(Width, Height);
            Form.Text       = "BulletSharp - Multimaterial Mesh Demo";

            DeviceSettings9 settings = new DeviceSettings9();

            settings.CreationFlags   = CreateFlags.HardwareVertexProcessing;
            settings.Windowed        = true;
            settings.MultisampleType = MultisampleType.FourSamples;
            try
            {
                InitializeDevice(settings);
            }
            catch
            {
                // Disable 4xAA if not supported
                settings.MultisampleType = MultisampleType.None;
                InitializeDevice(settings);
            }
        }