public void SetRenderTarget(RenderTarget renderTarget, DepthStencil dephtStencil)
        {
            OMSetRenderTargetImpl(renderTarget, dephtStencil);

            _omRenderTargets[0] = renderTarget;
            _omDepthStencil     = dephtStencil;
        }
        protected void InitOM()
        {
            OMInitialization init = GetOMInitialization();

            numRenderTargets = init.NbRenderTargets;
            _omRenderTargets = new RenderTarget[init.NbRenderTargets];
            if (init.SwapChain != null)
            {
                _swapChains.Add(init.SwapChain);
                _swapChain0         = init.SwapChain;
                _omBackBuffer       = init.SwapChain.BackBuffer;
                _omRenderTargets[0] = _omBackBuffer;
            }

            _omBlendState        = init.BlendState;
            _omDepthStencilStage = init.DepthTestState;

            _omDepthStencil     = init.DepthBuffer;
            _omBackDepthStencil = init.DepthBuffer;

            renderTargetStack  = new Stack <RenderStackValue>();
            renderTargetsStack = new Stack <RenderStackValues>();

            BlendStack.Push(_omBlendState);
            DepthStencilStack.Push(_omDepthStencilStage);
        }
        public void SetRenderTargets(int numTargets, RenderTarget[] renderTargets, DepthStencil dephtStencil)
        {
            OMSetRenderTargetsImp(numTargets, renderTargets, dephtStencil);
            if (renderTargets == null)
            {
                Array.Clear(_omRenderTargets, 0, numTargets);
            }
            else
            {
                ClrRuntime.Runtime.Copy(renderTargets, _omRenderTargets, numTargets);
            }

            this._omDepthStencil = dephtStencil;
        }
 protected abstract void OMSetRenderTargetImpl(RenderTarget renderTarget, DepthStencil dephtStencil);
 protected abstract void OMSetRenderTargetsImp(int numTargets, RenderTarget[] renderTargets, DepthStencil dephtStencil);