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);
}