static void RenderTargetSetup_colorStore(JSVCall vc) { if (vc.bGet) { UnityEngine.RenderTargetSetup _this = (UnityEngine.RenderTargetSetup)vc.csObj; var result = _this.colorStore; var arrRet = result; for (int i = 0; arrRet != null && i < arrRet.Length; i++) { JSApi.setEnum((int)JSApi.SetType.SaveAndTempTrace, (int)arrRet[i]); JSApi.moveSaveID2Arr(i); } JSApi.setArrayS((int)JSApi.SetType.Rval, (arrRet != null ? arrRet.Length : 0), true); } else { UnityEngine.Rendering.RenderBufferStoreAction[] arg0 = JSDataExchangeMgr.GetJSArg <UnityEngine.Rendering.RenderBufferStoreAction[]>(() => { int jsObjID = JSApi.getObject((int)JSApi.GetType.Arg); int length = JSApi.getArrayLength(jsObjID); var ret = new UnityEngine.Rendering.RenderBufferStoreAction[length]; for (var i = 0; i < length; i++) { JSApi.getElement(jsObjID, i); ret[i] = (UnityEngine.Rendering.RenderBufferStoreAction)JSApi.getEnum((int)JSApi.GetType.SaveAndRemove); } return(ret); }); UnityEngine.RenderTargetSetup _this = (UnityEngine.RenderTargetSetup)vc.csObj; _this.colorStore = arg0; JSMgr.changeJSObj(vc.jsObjID, _this); } }
static bool RenderTargetSetup_RenderTargetSetup2(JSVCall vc, int argc) { int _this = JSApi.getObject((int)JSApi.GetType.Arg); JSApi.attachFinalizerObject(_this); --argc; int len = argc; if (len == 8) { UnityEngine.RenderBuffer[] arg0 = JSDataExchangeMgr.GetJSArg <UnityEngine.RenderBuffer[]>(() => { int jsObjID = JSApi.getObject((int)JSApi.GetType.Arg); int length = JSApi.getArrayLength(jsObjID); var ret = new UnityEngine.RenderBuffer[length]; for (var i = 0; i < length; i++) { JSApi.getElement(jsObjID, i); ret[i] = (UnityEngine.RenderBuffer)JSMgr.datax.getObject((int)JSApi.GetType.SaveAndRemove); } return(ret); }); UnityEngine.RenderBuffer arg1 = (UnityEngine.RenderBuffer)JSMgr.datax.getObject((int)JSApi.GetType.Arg); System.Int32 arg2 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); UnityEngine.CubemapFace arg3 = (UnityEngine.CubemapFace)JSApi.getEnum((int)JSApi.GetType.Arg); UnityEngine.Rendering.RenderBufferLoadAction[] arg4 = JSDataExchangeMgr.GetJSArg <UnityEngine.Rendering.RenderBufferLoadAction[]>(() => { int jsObjID = JSApi.getObject((int)JSApi.GetType.Arg); int length = JSApi.getArrayLength(jsObjID); var ret = new UnityEngine.Rendering.RenderBufferLoadAction[length]; for (var i = 0; i < length; i++) { JSApi.getElement(jsObjID, i); ret[i] = (UnityEngine.Rendering.RenderBufferLoadAction)JSApi.getEnum((int)JSApi.GetType.SaveAndRemove); } return(ret); }); UnityEngine.Rendering.RenderBufferStoreAction[] arg5 = JSDataExchangeMgr.GetJSArg <UnityEngine.Rendering.RenderBufferStoreAction[]>(() => { int jsObjID = JSApi.getObject((int)JSApi.GetType.Arg); int length = JSApi.getArrayLength(jsObjID); var ret = new UnityEngine.Rendering.RenderBufferStoreAction[length]; for (var i = 0; i < length; i++) { JSApi.getElement(jsObjID, i); ret[i] = (UnityEngine.Rendering.RenderBufferStoreAction)JSApi.getEnum((int)JSApi.GetType.SaveAndRemove); } return(ret); }); UnityEngine.Rendering.RenderBufferLoadAction arg6 = (UnityEngine.Rendering.RenderBufferLoadAction)JSApi.getEnum((int)JSApi.GetType.Arg); UnityEngine.Rendering.RenderBufferStoreAction arg7 = (UnityEngine.Rendering.RenderBufferStoreAction)JSApi.getEnum((int)JSApi.GetType.Arg); JSMgr.addJSCSRel(_this, new UnityEngine.RenderTargetSetup(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)); } return(true); }
static void RenderTargetSetup_depthStore(JSVCall vc) { if (vc.bGet) { UnityEngine.RenderTargetSetup _this = (UnityEngine.RenderTargetSetup)vc.csObj; var result = _this.depthStore; JSApi.setEnum((int)JSApi.SetType.Rval, (int)result); } else { UnityEngine.Rendering.RenderBufferStoreAction arg0 = (UnityEngine.Rendering.RenderBufferStoreAction)JSApi.getEnum((int)JSApi.GetType.Arg); UnityEngine.RenderTargetSetup _this = (UnityEngine.RenderTargetSetup)vc.csObj; _this.depthStore = arg0; JSMgr.changeJSObj(vc.jsObjID, _this); } }
/// <summary> /// Sets the current render target using specified <see cref="RenderBufferLoadAction"/>. /// </summary> /// <param name="cmd">The command buffer to set the render target on</param> /// <param name="rt">The render target to set</param> /// <param name="loadAction">The load action</param> /// <param name="storeAction">The store action</param> /// <remarks> /// <see cref="RenderBufferLoadAction"/> are only used on Unity 2018.2 or newer. /// </remarks> private static void SetRenderTargetWithLoadStoreAction(this CommandBuffer cmd , RenderTargetIdentifier rt, LoadAction loadAction, StoreAction storeAction) { #if UNITY_2018_2_OR_NEWER cmd.SetRenderTarget(rt, loadAction, storeAction); #else cmd.SetRenderTarget(rt); #endif }