diff options
author | sanine <sanine.not@pm.me> | 2022-08-22 12:39:51 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-08-22 12:39:51 -0500 |
commit | b2c0dd12d2a39e74f8e6d63bffec073ef0871ea7 (patch) | |
tree | 743d7981669e242898af107871c41f65ee7d75ac /src/gl/window.c | |
parent | 249833947ff691dd79453c4d817387a6922236d6 (diff) |
add uniforms
Diffstat (limited to 'src/gl/window.c')
-rw-r--r-- | src/gl/window.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gl/window.c b/src/gl/window.c index 075bd6c..1b8c4bb 100644 --- a/src/gl/window.c +++ b/src/gl/window.c @@ -27,6 +27,8 @@ int window_should_close(lua_State *L); int window_poll_events(lua_State *L); int window_swap_buffers(lua_State *L); int window_set_framebuffer_size_callback(lua_State *L); +int window_get_time(lua_State *L); + void setup_window(lua_State *L, int honey_index) @@ -50,6 +52,7 @@ void setup_window(lua_State *L, int honey_index) hs_str_cfunc("pollEvents", window_poll_events), hs_str_cfunc("swapBuffers", window_swap_buffers), hs_str_cfunc("setFramebufferSizeCallback", window_set_framebuffer_size_callback), + hs_str_cfunc("getTime", window_get_time), hs_str_tbl("hintType", hint_types), hs_str_tbl("profileType", profile_types), @@ -158,3 +161,10 @@ int window_set_framebuffer_size_callback(lua_State *L) wdata->framebuffer_size_callback = hs_rstore(L); return 0; } + + +int window_get_time(lua_State *L) +{ + lua_pushnumber(L, glfwGetTime()); + return 1; +} |