Exemplo n.º 1
0
        protected void view1_MouseDown(object sender, MouseButtonEventArgs e)
        {
            if (e.ChangedButton == MouseButton.Middle && e.ButtonState == MouseButtonState.Pressed)
            {
                MainPlayer.Controller.LockCameraView = false;
            }

            D3DView view1 = (D3DView)sender;
            Point   p     = Mouse.GetPosition(view1);

            ObjectPicker.SelectionRay(e, p);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Function to perform clean up of the resources used by the view.
        /// </summary>
        protected override void OnCleanUp()
        {
            if (D3DView == null)
            {
                return;
            }

            // Unbind the depth/stencil view.
            if (Resource.Graphics.Output.DepthStencilView == this)
            {
                Resource.Graphics.Output.DepthStencilView = null;
            }

            Gorgon.Log.Print("Destroying depth/stencil view for {0}.",
                             LoggingLevel.Verbose,
                             Resource.Name);
            D3DView.Dispose();
            D3DView = null;
        }