Пример #1
0
        private void StartD3D()
        {
            _device         = new Device(DriverType.Hardware, DeviceCreationFlags.BgraSupport, FeatureLevel.Level_11_0);
            _graphicsDevice = GraphicsDevice.New(_device);

            _d3DSurface = new D3D11ImageSource(Window.GetWindow(this));
            _d3DSurface.IsFrontBufferAvailableChanged += OnIsFrontBufferAvailableChanged;

            CreateAndBindTargets();

            Source = _d3DSurface;

            RaiseLoadContent(new GraphicsDeviceEventArgs(_graphicsDevice));

            _contentNeedsRefresh = true;
            _isRendering         = true;
        }
Пример #2
0
        private void StartD3D()
        {
            _device = new Device(DriverType.Hardware, DeviceCreationFlags.BgraSupport, FeatureLevel.Level_11_0);
	        _graphicsDevice = GraphicsDevice.New(_device);

            _d3DSurface = new D3D11ImageSource(Window.GetWindow(this));
            _d3DSurface.IsFrontBufferAvailableChanged += OnIsFrontBufferAvailableChanged;

            CreateAndBindTargets();

            Source = _d3DSurface;

			RaiseLoadContent(new GraphicsDeviceEventArgs(_graphicsDevice));

	        _contentNeedsRefresh = true;
	        _isRendering = true;
        }