public Renderer(GraphicsDeviceManager graphics, SpriteBatch spriteBatch)
        {
            this.graphics = graphics.GraphicsDevice;
            this.SpriteSortMode = SpriteSortMode.Deferred;
            this.spriteBatch = spriteBatch;
            this.transformMatrix = Matrix.Identity;

            this.resolutionManager = new ResolutionManager();
            this.resolutionManager.Initialize(ref graphics);

            var state = new RasterizerState();
            state.FillMode = FillMode.WireFrame;
            spriteBatch.GraphicsDevice.RasterizerState = state;

            this.blendState = BlendState.AlphaBlend;
            this.samplerState = this.graphics.SamplerStates[0];
            this.depthStencilState = this.graphics.DepthStencilState;
           // this.rasterizerState = graphics.RasterizerState;
            this.effect = null;

            renderComponents = new List<IRenderComponent>();
        }
Beispiel #2
0
        public Renderer(GraphicsDeviceManager graphics, SpriteBatch spriteBatch)
        {
            this.graphics        = graphics.GraphicsDevice;
            this.SpriteSortMode  = SpriteSortMode.Deferred;
            this.spriteBatch     = spriteBatch;
            this.transformMatrix = Matrix.Identity;

            this.resolutionManager = new ResolutionManager();
            this.resolutionManager.Initialize(ref graphics);

            var state = new RasterizerState();

            state.FillMode = FillMode.WireFrame;
            spriteBatch.GraphicsDevice.RasterizerState = state;

            this.blendState        = BlendState.AlphaBlend;
            this.samplerState      = this.graphics.SamplerStates[0];
            this.depthStencilState = this.graphics.DepthStencilState;
            // this.rasterizerState = graphics.RasterizerState;
            this.effect = null;

            renderComponents = new List <IRenderComponent>();
        }