public D3DPanel()
        {
            this.InitializeComponent();

            // Only use Direct3D if outside of the designer
            if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                d3dApp = new D3DApp(this);
                d3dApp.Initialize();

                d3dApp.Camera.Position = new SharpDX.Vector3(1, 1, 2);
                d3dApp.Camera.LookAtDir = -d3dApp.Camera.Position;

                CompositionTarget.Rendering += CompositionTarget_Rendering;
            }
        }
示例#2
0
        public D3DPanel()
        {
            this.InitializeComponent();

            // Only use Direct3D if outside of the designer
            if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                d3dApp = new D3DApp(this);
                d3dApp.Initialize();

                d3dApp.Camera.Position  = new SharpDX.Vector3(1, 1, 2);
                d3dApp.Camera.LookAtDir = -d3dApp.Camera.Position;

                CompositionTarget.Rendering += CompositionTarget_Rendering;
            }
        }