public RenderingPane(Factory dxgiFactory, SlimDX.Direct3D11.Device d3D11Device, DeviceContext d3D11DeviceContext, IntPtr handle, int width, int height, IRenderingStrategy renderingStrategy) { mDxgiFactory = dxgiFactory; mD3D11Device = d3D11Device; mD3D11DeviceContext = d3D11DeviceContext; RenderingStrategy = renderingStrategy; var swapChainDescription = new SwapChainDescription { BufferCount = 1, ModeDescription = new ModeDescription(width, height, new Rational(60, 1), Format.R8G8B8A8_UNorm), IsWindowed = true, OutputHandle = handle, SampleDescription = new SampleDescription(1, 0), SwapEffect = SwapEffect.Discard, Usage = Usage.RenderTargetOutput }; mSwapChain = new SwapChain(mDxgiFactory, mD3D11Device, swapChainDescription); mDxgiFactory.SetWindowAssociation(handle, WindowAssociationFlags.IgnoreAll); CreateD3D11Resources(width, height); }
public void RegisterStrategy(IRenderingStrategy strategy) { _strategies.Fill(strategy); }