#include #include #include #include #include "setup.h" int glfwInit_bind(lua_State *L) { int bind_result = glfwInit(); lua_pushinteger(L, bind_result); return 1; } int glfwTerminate_bind(lua_State *L) { glfwTerminate(); return 0; } int glfwInitHint_bind(lua_State *L) { int hint = luaL_checkinteger(L, 1); int value = luaL_checkinteger(L, 2); glfwInitHint(hint, value); return 0; } int glfwGetVersion_bind(lua_State *L) { int major, minor, rev; glfwGetVersion(&major, &minor, &rev); lua_pushinteger(L, major); lua_pushinteger(L, minor); lua_pushinteger(L, rev); return 3; } int glfwGetVersionString_bind(lua_State *L) { const char * bind_result = glfwGetVersionString(); lua_pushstring(L, bind_result); return 1; } int glfwGetError_bind(lua_State *L) { const char * description; int bind_result = glfwGetError(&description); lua_pushinteger(L, bind_result); lua_pushstring(L, description); return 2; }