LuaGlue
LuaGlue copied to clipboard
C++11 Lua 5.2 Binding Library
Hi all, how can I get a c++ object instance from lua without call a "new" inside lua script? In other words, I need to get a lua object from...
I'm attempting to use LuaGlue in a project that is being compiled on both OS X and Windows (64-bit support on both platforms). I'm using Visual Studio 2013 Update 4...
I am considering a rename to Glua before a 1.0 release sometime in the (possibly distant) future. this would change the api. Also along with that, it would likely gain...
Hello, Is there currently any way to create a table in C++ and pass it to a Lua function? I'm actually trying to convert a std::vector (or a std::list) so...
I'd like to know if it's possible to check if a global function exists before doing invokeFunction or invokeVoidFunction. If I try to call a function that doesn't exist, the...
I have the method: ``` static CameraPtr CreatePerspective(float fieldOfView = MATH_PIOVER4, float aspectRatio = 1.33333333333333f, float nearPlane = 0.2f, float farPlane = 100000.0f); ``` CameraPtr is shared_ptr Will this work...
The current examples are too messy, and complicated to act as reasonable examples. They evolved from basic tests, but were moved to an examples dir because they were worse tests...
We need a proper test setup. with small individual tests testing everything possible. not sure how to mock out lua though? the current examples do not work well as tests.
## Example: ``` g_lua. Class("ClassTest"). method("emptyRet", std::function([](int x) { std::cout state(), &lua_call_func, 1); lua_setfield(luaGlue->state(), -2, name_.c_str()); return true; } static int lua_call_func(lua_State *state) { auto mimp = (LuaGlueStdFuncMethod *)lua_touserdata(state, lua_upvalueindex(1));...
## Problem: ``` Double function named invokeFunction ``` ## Example: ``` g_luaState.invokeTabledFunction("tab.func", 5); g_luaState.invokeTabledFunction("SandBoxed.func", 5); g_luaState.invokeTabledFunction("func", 5); ``` ## Todo: - add to: void invokeFunction - add to: void setGlobal...