Added reading texture map input from file so we can give custom names to the entries.
This commit is contained in:
@@ -49,15 +49,9 @@ for shader_file in shader_files:
|
||||
spv = env.SpirV(source = shader_file, target=f'{shader_file}.spv')
|
||||
env.Default(spv)
|
||||
|
||||
ui_textures = Split("""
|
||||
#assets/fonts/symtex.png
|
||||
#assets/bitmaps/cube.png
|
||||
#assets/bitmaps/sdl.png
|
||||
""")
|
||||
|
||||
pack = env.PackTextures(
|
||||
target = '#assets/bitmaps/ui.png',
|
||||
source = ui_textures
|
||||
source = ['#assets/bitmaps/ui_elements.txt']
|
||||
)
|
||||
env.Default(pack)
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ void UIRenderer::init(Application& application)
|
||||
.textureHeight = textureArgs.height
|
||||
});
|
||||
|
||||
auto itEntry = mTextureAtlas.entries.find("assets/fonts/symtex.png");
|
||||
auto itEntry = mTextureAtlas.entries.find("symtex_glyphs");
|
||||
if (itEntry == mTextureAtlas.entries.end())
|
||||
{
|
||||
throw std::runtime_error("Texture atlas is missing entry for the font.");
|
||||
|
||||
Reference in New Issue
Block a user