private Internal_SetMRTFullSetup ( |
||
colorSA | ||
depth | ||
mip | int | |
face | CubemapFace | |
depthSlice | int | |
colorLoadSA | RenderBufferLoadAction | |
colorStoreSA | RenderBufferStoreAction | |
depthLoad | RenderBufferLoadAction | |
depthStore | RenderBufferStoreAction | |
Результат | 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"); } RenderBufferLoadAction[] colorLoad = setup.colorLoad; for (int i = 0; i < colorLoad.Length; i++) { RenderBufferLoadAction load = colorLoad[i]; Graphics.CheckLoadActionValid(load, "Color"); } RenderBufferStoreAction[] colorStore = setup.colorStore; for (int j = 0; j < colorStore.Length; j++) { RenderBufferStoreAction store = colorStore[j]; Graphics.CheckStoreActionValid(store, "Color"); } Graphics.CheckLoadActionValid(setup.depthLoad, "Depth"); Graphics.CheckStoreActionValid(setup.depthStore, "Depth"); if (setup.cubemapFace < CubemapFace.Unknown || setup.cubemapFace > CubemapFace.NegativeZ) { throw new ArgumentException("Bad CubemapFace provided"); } Graphics.Internal_SetMRTFullSetup(setup.color, out setup.depth, setup.mipLevel, setup.cubemapFace, setup.colorLoad, setup.colorStore, setup.depthLoad, setup.depthStore); }
internal static void SetRenderTargetImpl(RenderTargetSetup setup) { if (setup.color.Length == 0) { Debug.LogError("Invalid color buffer count for SetRenderTarget"); return; } if (setup.color.Length != setup.colorLoad.Length) { Debug.LogError("Color LoadAction and Buffer arrays have different sizes"); return; } if (setup.color.Length != setup.colorStore.Length) { Debug.LogError("Color StoreAction and Buffer arrays have different sizes"); return; } Graphics.Internal_SetMRTFullSetup(setup.color, out setup.depth, setup.mipLevel, setup.cubemapFace, setup.colorLoad, setup.colorStore, setup.depthLoad, setup.depthStore); }