Пример #1
0
        public Renderer(GraphicsDevice device, ContentManager content)
        {
            this.device = device;
            debug       = new ImmediateModeDebug(device);

            drawEffect = new BasicEffect(device);
            drawEffect.TextureEnabled     = true;
            drawEffect.VertexColorEnabled = false;

            drawSpriteEffect = new AlphaTestEffect(device);
            drawSpriteEffect.VertexColorEnabled = false;

            drawIDEffect = new BasicEffect(device);
            drawIDEffect.TextureEnabled     = false;
            drawIDEffect.VertexColorEnabled = false;

            Camera.Viewport = device.Viewport;

            mousePickTarget = new RenderTarget2D(device, 1, 1, false, SurfaceFormat.Color, DepthFormat.Depth24);

            immediate2d = new ImmediateMode2d(device);
        }
Пример #2
0
        public Renderer(GraphicsDevice device, ContentManager content)
        {
            this.device = device;
            debug = new ImmediateModeDebug(device);

            drawEffect = new BasicEffect(device);
            drawEffect.TextureEnabled = true;
            drawEffect.VertexColorEnabled = false;

            drawSpriteEffect = new AlphaTestEffect(device);
            drawSpriteEffect.VertexColorEnabled = false;

            drawIDEffect = new BasicEffect(device);
            drawIDEffect.TextureEnabled = false;
            drawIDEffect.VertexColorEnabled = false;

            Camera.Viewport = device.Viewport;

            mousePickTarget = new RenderTarget2D(device, 1, 1, false, SurfaceFormat.Color, DepthFormat.Depth24);

            immediate2d = new ImmediateMode2d(device);
        }