Rest of font loading/unloading functions. GlyphInfo type to userdata. GlyphInfo management functions.

This commit is contained in:
jussi
2024-01-03 18:23:19 +02:00
parent 192d471fb3
commit 70a2bcba18
22 changed files with 957 additions and 139 deletions

View File

@@ -1134,9 +1134,9 @@ int ltexturesLoadTextureFromData( lua_State *L ) {
Texture texture = { 0 };
int t = 1;
lua_pushnil( L );
lua_pushnil( L );
while ( lua_next( L, t ) != 0 ) {
while ( lua_next( L, t ) != 0 ) {
if ( strcmp( "id", (char*)lua_tostring( L, -2 ) ) == 0 ) {
texture.id = (unsigned int)luaL_checkinteger( L, -1 );
}
@@ -1152,8 +1152,8 @@ int ltexturesLoadTextureFromData( lua_State *L ) {
else if ( strcmp( "format", (char*)lua_tostring( L, -2 ) ) == 0 ) {
texture.format = luaL_checkinteger( L, -1 );
}
lua_pop( L, 1 );
}
lua_pop( L, 1 );
}
uluaPushTexture( L, texture );
return 1;