Oglr.XnaGame.Initialize C# (CSharp) Method

Initialize() protected method

protected Initialize ( ) : void
return void
        protected override void Initialize()
        {
            base.Initialize();

            Size pictureBoxSize = _mainForm.CanvasSize;

            ResizeBackBuffer(pictureBoxSize.Width, pictureBoxSize.Height);

            _xnaForm.Hide();

            BasicEffect = new BasicEffect( GraphicsDevice );

            Matrix world = Matrix.Identity;
            Matrix projection = Matrix.CreateOrthographicOffCenter(0,
                GraphicsDevice.Viewport.Width,
                GraphicsDevice.Viewport.Height,
                0,
                0,
                1);

            BasicEffect.World = world ;
            BasicEffect.Projection = projection ;
        }