diff options
author | sanine <sanine.not@pm.me> | 2023-05-10 22:00:11 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2023-05-10 22:00:11 -0500 |
commit | f5b103de5b2b48433ce2895a1a73df40c4e86bf8 (patch) | |
tree | 4e049a26fb3ae35d1cd331918f37d49f961f6b54 /src/opengl | |
parent | ab3005ffd6999885deb96b476d4620eb5d0135a8 (diff) |
add ability to convert dContactGeom to table
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/texture.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/opengl/texture.c b/src/opengl/texture.c index 13b23c0..a1fda90 100644 --- a/src/opengl/texture.c +++ b/src/opengl/texture.c @@ -6,6 +6,7 @@ int gl_texture_create(lua_State *L); +int glDeleteTextures_bind(lua_State *L); int gl_texture_bind(lua_State *L); int gl_texture_image_2d(lua_State *L); int gl_texture_generate_mipmaps(lua_State *L); @@ -18,6 +19,7 @@ void setup_texture(lua_State *L, int gl_index) struct honey_tbl_t tbl[] = { /* functions */ H_FUNC("GenTextures", gl_texture_create), + H_FUNC("DeleteTextures", glDeleteTextures_bind), H_FUNC("BindTexture", gl_texture_bind), H_FUNC("TexImage2D", gl_texture_image_2d), H_FUNC("GenerateMipmap", gl_texture_generate_mipmaps), @@ -74,6 +76,14 @@ int gl_texture_create(lua_State *L) } +int glDeleteTextures_bind(lua_State *L) +{ + GLuint texture = luaL_checkinteger(L, 1); + glDeleteTextures(1, &texture); + return 0; +} + + int gl_texture_bind(lua_State *L) { lua_Integer target, texture; |