Exemplo n.º 1
0
        public SimpleD3D11Renderer(ID3D11Context context, BrushCache brushCache, TextFormatCache textFormatCache)
        {
            this.context = context;

            this.brushCache      = brushCache;
            this.textFormatCache = textFormatCache;
        }
Exemplo n.º 2
0
 public D3D11Renderer(ID3D11Context context, BrushCache brushCache, TextFormatCache textFormatCache, D3D11TextureManager9 textureManager)
 {
     this.context         = context;
     this.brushCache      = brushCache;
     this.textFormatCache = textFormatCache;
     this.textureManager  = textureManager;
     context.Draw        += this.OnDraw;
 }
Exemplo n.º 3
0
        public SimpleRenderer()
        {
            switch (Drawing.RenderMode)
            {
            case RenderMode.Dx9:
            {
                var context = new D3D9Context();
                var font    = new FontCache(context);
                this.active = new SimpleD3D9Renderer(context, font);
                break;
            }

            case RenderMode.Dx11:
            {
                var context = new D3D11Context();
                var brush   = new BrushCache(context);
                var text    = new TextFormatCache(context);
                this.active = new SimpleD3D11Renderer(context, brush, text);
                break;
            }
            }
        }