public SimpleD3D11Renderer(ID3D11Context context, BrushCache brushCache, TextFormatCache textFormatCache) { this.context = context; this.brushCache = brushCache; this.textFormatCache = textFormatCache; }
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; }
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; } } }