Пример #1
0
 public void SetRenderTarget(RenderTargetCube renderTarget, CubeMapFace cubeMapFace)
 {
     if (renderTarget == null)
     {
         SetRenderTargets(null);
     }
     else
     {
         _tempRenderTargetBinding[0] = new RenderTargetBinding(renderTarget, cubeMapFace);
         SetRenderTargets(_tempRenderTargetBinding);
     }
 }
Пример #2
0
        public RenderTargetBinding(RenderTargetCube renderTarget, CubeMapFace cubeMapFace)
        {
            if (renderTarget == null)
            {
                throw new ArgumentNullException("renderTarget");
            }
            if (cubeMapFace < CubeMapFace.PositiveX || cubeMapFace > CubeMapFace.NegativeZ)
            {
                throw new ArgumentOutOfRangeException("cubeMapFace");
            }

            _renderTarget = renderTarget;
            _arraySlice   = (int)cubeMapFace;
        }