Exemple #1
0
        public RenderTargetBinding(RenderTarget3D renderTarget, int arraySlice)
        {
            if (renderTarget == null)
            {
                throw new ArgumentNullException(nameof(renderTarget));
            }
            if (arraySlice < 0 || arraySlice >= renderTarget.Depth)
            {
                throw new ArgumentOutOfRangeException(nameof(arraySlice));
            }

            RenderTarget = renderTarget;
            ArraySlice   = arraySlice;
            DepthFormat  = renderTarget.DepthStencilFormat;
        }
Exemple #2
0
 public RenderTargetBinding(RenderTarget3D renderTarget)
 {
     RenderTarget = renderTarget ?? throw new ArgumentNullException(nameof(renderTarget));
     ArraySlice   = 0;
     DepthFormat  = renderTarget.DepthStencilFormat;
 }