Load UI overla font from asset path

Refs #627
This commit is contained in:
Sascha Willems 2020-02-17 21:09:43 +01:00
parent 662d2b3464
commit fcb0a2a46a

View file

@ -1,3 +1,4 @@
/*
* UI overlay class using ImGui
*
@ -72,7 +73,8 @@ namespace vks
delete[] fontAsset;
}
#else
io.Fonts->AddFontFromFileTTF("./../data/Roboto-Medium.ttf", 16.0f);
const std::string filename = getAssetPath() + "Roboto-Medium.ttf";
io.Fonts->AddFontFromFileTTF(filename.c_str(), 16.0f);
#endif
io.Fonts->GetTexDataAsRGBA32(&fontData, &texWidth, &texHeight);
VkDeviceSize uploadSize = texWidth*texHeight * 4 * sizeof(char);