UnityEngine.Graphics.SetRenderTargetImpl C# (CSharp) Method

SetRenderTargetImpl() static private method

static private SetRenderTargetImpl ( RenderTargetSetup setup ) : void
setup RenderTargetSetup
return void
        internal static void SetRenderTargetImpl(RenderTargetSetup setup)
        {
            if (setup.color.Length == 0)
            {
                throw new ArgumentException("Invalid color buffer count for SetRenderTarget");
            }
            if (setup.color.Length != setup.colorLoad.Length)
            {
                throw new ArgumentException("Color LoadAction and Buffer arrays have different sizes");
            }
            if (setup.color.Length != setup.colorStore.Length)
            {
                throw new ArgumentException("Color StoreAction and Buffer arrays have different sizes");
            }
            foreach (RenderBufferLoadAction action in setup.colorLoad)
            {
                CheckLoadActionValid(action, "Color");
            }
            foreach (RenderBufferStoreAction action2 in setup.colorStore)
            {
                CheckStoreActionValid(action2, "Color");
            }
            CheckLoadActionValid(setup.depthLoad, "Depth");
            CheckStoreActionValid(setup.depthStore, "Depth");
            if ((setup.cubemapFace < CubemapFace.Unknown) || (setup.cubemapFace > CubemapFace.NegativeZ))
            {
                throw new ArgumentException("Bad CubemapFace provided");
            }
            Internal_SetMRTFullSetup(setup.color, out setup.depth, setup.mipLevel, setup.cubemapFace, setup.depthSlice, setup.colorLoad, setup.colorStore, setup.depthLoad, setup.depthStore);
        }

Same methods

Graphics::SetRenderTargetImpl ( RenderBuffer colorBuffer, RenderBuffer depthBuffer, int mipLevel, CubemapFace face, int depthSlice ) : void
Graphics::SetRenderTargetImpl ( RenderTexture rt, int mipLevel, CubemapFace face, int depthSlice ) : void

Usage Example

コード例 #1
0
ファイル: Graphics.cs プロジェクト: qipa/UnityDecompiled-2
 internal static void SetRenderTargetImpl(RenderTexture rt, int mipLevel, CubemapFace face)
 {
     if (rt)
     {
         Graphics.SetRenderTargetImpl(rt.colorBuffer, rt.depthBuffer, mipLevel, face);
     }
     else
     {
         Graphics.Internal_SetNullRT();
     }
 }
All Usage Examples Of UnityEngine.Graphics::SetRenderTargetImpl