Exemplo n.º 1
0
        public EVRDisplay()
        {
            var lTuple = D3D9Image.createD3D9Image();

            if (lTuple != null)
            {
                this.imageSource = lTuple.Item1;

                this.surface = lTuple.Item2;
            }

            if (this.imageSource != null)
            {
                var image = new System.Windows.Controls.Image();
                image.Stretch = System.Windows.Media.Stretch.Uniform;
                image.Source  = this.imageSource;
                this.AddChild(image);

                // To greatly reduce flickering we're only going to AddDirtyRect
                // when WPF is rendering.
                System.Windows.Media.CompositionTarget.Rendering += this.CompositionTargetRendering;
            }
        }