internal GraphicsDevice(GraphicsDeviceManager mngr)
        {
            this.mngr    = mngr;
            _displayMode = new DisplayMode(this.mngr.PreferredBackBufferWidth, this.mngr.PreferredBackBufferHeight);

            // Create the Sprite Rendering engine
            spriteDevice = new GraphicsDevice2D(this);

            // Init RenderState
            _renderState = new RenderState();

            SizeChanged(this.mngr.PreferredBackBufferWidth, this.mngr.PreferredBackBufferHeight);
        }
Esempio n. 2
0
        public GraphicsDevice()
        {
            // Initialize the main viewport
            _viewport               = new Viewport();
            _viewport.X             = 0;
            _viewport.Y             = 0;
            _viewport.Width         = DisplayMode.Width;
            _viewport.Height        = DisplayMode.Height;
            _viewport.TitleSafeArea = new Rectangle(0, 0, DisplayMode.Width, DisplayMode.Height);

            // Create the Sprite Rendering engine
            _spriteDevice = new GraphicsDevice2D(this);

            // Init RenderState
            _renderState = new RenderState();
        }