164 lines
5.5 KiB
C#
164 lines
5.5 KiB
C#
#if USE_UNI_LUA
|
|
using LuaAPI = UniLua.Lua;
|
|
using RealStatePtr = UniLua.ILuaState;
|
|
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
#else
|
|
using LuaAPI = XLua.LuaDLL.Lua;
|
|
using RealStatePtr = System.IntPtr;
|
|
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
#endif
|
|
|
|
using XLua;
|
|
using System.Collections.Generic;
|
|
|
|
|
|
namespace XLua.CSObjectWrap
|
|
{
|
|
using Utils = XLua.Utils;
|
|
public class UnityEngineCameraRenderRequestWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(UnityEngine.Camera.RenderRequest);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 4, 0);
|
|
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "isValid", _g_get_isValid);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "mode", _g_get_mode);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "result", _g_get_result);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "outputSpace", _g_get_outputSpace);
|
|
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Utils.EndClassRegister(type, L, translator);
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int __CreateInstance(RealStatePtr L)
|
|
{
|
|
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
if(LuaAPI.lua_gettop(L) == 3 && translator.Assignable<UnityEngine.Camera.RenderRequestMode>(L, 2) && translator.Assignable<UnityEngine.RenderTexture>(L, 3))
|
|
{
|
|
UnityEngine.Camera.RenderRequestMode _mode;translator.Get(L, 2, out _mode);
|
|
UnityEngine.RenderTexture _rt = (UnityEngine.RenderTexture)translator.GetObject(L, 3, typeof(UnityEngine.RenderTexture));
|
|
|
|
var gen_ret = new UnityEngine.Camera.RenderRequest(_mode, _rt);
|
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
|
}
|
|
if(LuaAPI.lua_gettop(L) == 4 && translator.Assignable<UnityEngine.Camera.RenderRequestMode>(L, 2) && translator.Assignable<UnityEngine.Camera.RenderRequestOutputSpace>(L, 3) && translator.Assignable<UnityEngine.RenderTexture>(L, 4))
|
|
{
|
|
UnityEngine.Camera.RenderRequestMode _mode;translator.Get(L, 2, out _mode);
|
|
UnityEngine.Camera.RenderRequestOutputSpace _space;translator.Get(L, 3, out _space);
|
|
UnityEngine.RenderTexture _rt = (UnityEngine.RenderTexture)translator.GetObject(L, 4, typeof(UnityEngine.RenderTexture));
|
|
|
|
var gen_ret = new UnityEngine.Camera.RenderRequest(_mode, _space, _rt);
|
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
|
}
|
|
|
|
if (LuaAPI.lua_gettop(L) == 1)
|
|
{
|
|
translator.Push(L, default(UnityEngine.Camera.RenderRequest));
|
|
return 1;
|
|
}
|
|
|
|
}
|
|
catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Camera.RenderRequest constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_isValid(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.Camera.RenderRequest gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isValid);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_mode(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.Camera.RenderRequest gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
translator.PushUnityEngineCameraRenderRequestMode(L, gen_to_be_invoked.mode);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_result(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.Camera.RenderRequest gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
translator.Push(L, gen_to_be_invoked.result);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_outputSpace(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.Camera.RenderRequest gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
translator.PushUnityEngineCameraRenderRequestOutputSpace(L, gen_to_be_invoked.outputSpace);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|