diff options
| author | jussi | 2023-08-24 20:19:13 +0300 |
|---|---|---|
| committer | jussi | 2023-08-24 20:19:13 +0300 |
| commit | 6e17282197320bfc3af6a225fb3d9e13194022fa (patch) | |
| tree | e0be6b9033481c99dd76f3791927a5e9080989b2 /src/lua_core.c | |
| parent | 3fc07a02d5213a88ebb555d3133af2746600cf61 (diff) | |
| download | reilua-enhanced-6e17282197320bfc3af6a225fb3d9e13194022fa.tar.gz reilua-enhanced-6e17282197320bfc3af6a225fb3d9e13194022fa.tar.bz2 reilua-enhanced-6e17282197320bfc3af6a225fb3d9e13194022fa.zip | |
GetFontTexture.
Diffstat (limited to 'src/lua_core.c')
| -rw-r--r-- | src/lua_core.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lua_core.c b/src/lua_core.c index c831694..77564ee 100644 --- a/src/lua_core.c +++ b/src/lua_core.c @@ -1612,6 +1612,7 @@ void luaRegister() { assingGlobalFunction( "GetFontBaseSize", ltextGetFontBaseSize ); assingGlobalFunction( "GetFontGlyphCount", ltextGetFontGlyphCount ); assingGlobalFunction( "GetFontGlyphPadding", ltextGetFontGlyphPadding ); + assingGlobalFunction( "GetFontTexture", ltextGetFontTexture ); /* Audio. */ /* Audio device management. */ @@ -2959,6 +2960,20 @@ void uluaPushBoundingBox( lua_State *L, BoundingBox box ) { lua_rawseti( L, -2, 2 ); } +void uluaPushTexture( lua_State *L, Texture texture ) { + lua_createtable( L, 5, 0 ); + lua_pushinteger( L, texture.id ); + lua_setfield( L, -2, "id" ); + lua_pushinteger( L, texture.width ); + lua_setfield( L, -2, "width" ); + lua_pushinteger( L, texture.height ); + lua_setfield( L, -2, "height" ); + lua_pushinteger( L, texture.mipmaps ); + lua_setfield( L, -2, "mipmaps" ); + lua_pushinteger( L, texture.format ); + lua_setfield( L, -2, "format" ); +} + int uluaGetTableLen( lua_State *L ) { return uluaGetTableLenIndex( L, lua_gettop( L ) ); } |
