diff options
Diffstat (limited to 'src/opengl/setup.c')
-rw-r--r-- | src/opengl/setup.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/opengl/setup.c b/src/opengl/setup.c new file mode 100644 index 0000000..b169660 --- /dev/null +++ b/src/opengl/setup.c @@ -0,0 +1,23 @@ +#include <lua.h> +#include <lauxlib.h> +#include <glad/glad.h> +#include "util/util.h" +#include "bind.h" + + +void setup_gl(lua_State *L, int honey_tbl) +{ + struct honey_tbl_t tbl[] = { + #define X(name, func) H_FUNC(name, func), + GL_FUNCTIONS + #undef X + + #define X(name, value) H_INT(name, value), + GL_ENUM + #undef X + + H_END + }; + create_table(L, tbl); + lua_setfield(L, honey_tbl, "gl"); +} |