예제 #1
0
        //============================================================
        public void SetRenderTarget(FDxBufferedDepth depth, FDxBufferedTexture[] targets)
        {
            int count = targets.Length;

            RenderTargetView[] targetViews = new RenderTargetView[count];
            Viewport[]         viewports   = new Viewport[count];
            for (int n = 0; n < count; n++)
            {
                targetViews[n] = targets[n].NativeTarget;
                viewports[n]   = targets[n].NativeViewport;
            }
            _nativeDevice.OutputMerger.SetTargets(depth.NativeDepth, targetViews);
            //_nativeDevice.OutputMerger.SetTargets(targetViews);
            _nativeDevice.Rasterizer.SetViewports(viewports);
        }
예제 #2
0
 //============================================================
 public void SetRenderTarget(FDxBufferedDepth depth, FDxBufferedTexture target)
 {
     _nativeTargetActive = target.NativeTarget;
     _nativeDevice.OutputMerger.SetTargets(depth.NativeDepth, _nativeTargetActive);
     _nativeDevice.Rasterizer.SetViewports(target.NativeViewport);
 }