Ejemplo n.º 1
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>();
        }
Ejemplo n.º 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>();
        }