428 lines
14 KiB
C#
428 lines
14 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 BFPostEffectVividBloomWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(BF.PostEffectVividBloom);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 7, 4, 0);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetIntensity", _m_SetIntensity);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetIterations", _m_SetIterations);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetThreshold", _m_SetThreshold);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetSoftThreshold", _m_SetSoftThreshold);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshFilter", _m_RefreshFilter);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshIntensity", _m_RefreshIntensity);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnRenderImage", _m_OnRenderImage);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Intensity", _g_get_Intensity);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Iterations", _g_get_Iterations);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Threshold", _g_get_Threshold);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "SoftThreshold", _g_get_SoftThreshold);
|
|
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 3, 3);
|
|
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "FilterID", _g_get_FilterID);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "IntensityID", _g_get_IntensityID);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "SourceTexID", _g_get_SourceTexID);
|
|
|
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "FilterID", _s_set_FilterID);
|
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "IntensityID", _s_set_IntensityID);
|
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "SourceTexID", _s_set_SourceTexID);
|
|
|
|
|
|
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) == 1)
|
|
{
|
|
|
|
var gen_ret = new BF.PostEffectVividBloom();
|
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
|
}
|
|
|
|
}
|
|
catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to BF.PostEffectVividBloom constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetIntensity(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.PostEffectVividBloom gen_to_be_invoked = (BF.PostEffectVividBloom)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
float _value = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
gen_to_be_invoked.SetIntensity( _value );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetIterations(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.PostEffectVividBloom gen_to_be_invoked = (BF.PostEffectVividBloom)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _value = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
gen_to_be_invoked.SetIterations( _value );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetThreshold(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.PostEffectVividBloom gen_to_be_invoked = (BF.PostEffectVividBloom)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
float _value = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
gen_to_be_invoked.SetThreshold( _value );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetSoftThreshold(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.PostEffectVividBloom gen_to_be_invoked = (BF.PostEffectVividBloom)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
float _value = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
gen_to_be_invoked.SetSoftThreshold( _value );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RefreshFilter(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.PostEffectVividBloom gen_to_be_invoked = (BF.PostEffectVividBloom)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.RefreshFilter( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RefreshIntensity(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.PostEffectVividBloom gen_to_be_invoked = (BF.PostEffectVividBloom)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.RefreshIntensity( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_OnRenderImage(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.PostEffectVividBloom gen_to_be_invoked = (BF.PostEffectVividBloom)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
BF.PostEffectContext _context = (BF.PostEffectContext)translator.GetObject(L, 2, typeof(BF.PostEffectContext));
|
|
|
|
var gen_ret = gen_to_be_invoked.OnRenderImage( _context );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Intensity(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.PostEffectVividBloom gen_to_be_invoked = (BF.PostEffectVividBloom)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.Intensity);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Iterations(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.PostEffectVividBloom gen_to_be_invoked = (BF.PostEffectVividBloom)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Iterations);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Threshold(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.PostEffectVividBloom gen_to_be_invoked = (BF.PostEffectVividBloom)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.Threshold);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_SoftThreshold(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.PostEffectVividBloom gen_to_be_invoked = (BF.PostEffectVividBloom)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.SoftThreshold);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_FilterID(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.xlua_pushinteger(L, BF.PostEffectVividBloom.FilterID);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_IntensityID(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.xlua_pushinteger(L, BF.PostEffectVividBloom.IntensityID);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_SourceTexID(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.xlua_pushinteger(L, BF.PostEffectVividBloom.SourceTexID);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_FilterID(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
BF.PostEffectVividBloom.FilterID = LuaAPI.xlua_tointeger(L, 1);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_IntensityID(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
BF.PostEffectVividBloom.IntensityID = LuaAPI.xlua_tointeger(L, 1);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_SourceTexID(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
BF.PostEffectVividBloom.SourceTexID = LuaAPI.xlua_tointeger(L, 1);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|