diff options
author | sanine <sanine.not@pm.me> | 2023-02-22 17:35:17 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2023-02-22 17:35:17 -0600 |
commit | b5f0a45d9b10ebab8610ba235bc46f69fd58e2a2 (patch) | |
tree | 8fef6c14a2d5c1ad316cbc072af3d313908350d2 /src/glm/glm.c | |
parent | 353d60d3ebc353aef474633e7064067a2ef343ce (diff) |
begin cglm bind refactor
Diffstat (limited to 'src/glm/glm.c')
-rw-r--r-- | src/glm/glm.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/glm/glm.c b/src/glm/glm.c deleted file mode 100644 index ca6238a..0000000 --- a/src/glm/glm.c +++ /dev/null @@ -1,34 +0,0 @@ -#include <lua.h> -#include <honeysuckle.h> -#include "glm.h" - - -void setup_glm(lua_State *L, int honey_index) -{ - lua_createtable(L, 0, 1); - int glm_tbl = lua_gettop(L); - - setup_vec3(L, glm_tbl); - setup_mat4(L, glm_tbl); - - setup_transform(L, glm_tbl); - setup_camera(L, glm_tbl); - - lua_setfield(L, honey_index, "glm"); -} - - -void array_get(lua_State *L, int max, float *array, int index) -{ - if (index < 0 || index >= max) - hs_throw_error(L, "index %d is out of range [0-%d]", index, max-1); - lua_pushnumber(L, array[index]); -} - - -void array_set(lua_State *L, int max, float *array, int index, float value) -{ - if (index < 0 || index >= max) - hs_throw_error(L, "index %d is out of range [0-%d]", index, max-1); - array[index] = value; -} |