summaryrefslogtreecommitdiff
path: root/src/opengl/setup.c
blob: b169660d263308fd45b4c10ea07e56687a001d50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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");
}