Esempio n. 1
0
        protected override void OnResize(EventArgs e)
        {
            base.OnResize(e);

            device.ResizeBackBuffer(Width, Height);
            device.ViewPort = new ViewPort(0, 0, Width, Height);
            projection      = Matrix.PerspectiveFovLh((float)Width / (float)Height, Igneel.Numerics.PIover6, 1, 1000);
        }
Esempio n. 2
0
        protected override void OnResize(EventArgs e)
        {
            base.OnResize(e);

            if (device != null)
            {
                //resize the device back buffer after the form's size changed
                device.ResizeBackBuffer(Width, Height);

                //set the new render target viewport
                device.ViewPort = new ViewPort(0, 0, Width, Height);

                //create the projection matrix with the new aspect ratio
                projection = Matrix.PerspectiveFovLh((float)Width / (float)Height, Igneel.Numerics.PIover6, 1, 1000);
            }
        }