Update to FontAtlasFactory for more eficent loading
This commit is contained in:
@@ -16,15 +16,16 @@ namespace OpenVulkano::Scene
|
||||
{
|
||||
struct FontIdentifier
|
||||
{
|
||||
FontIdentifier(const std::string& font_, const std::set<uint32_t>& charset, SubpixelLayout subpixelLayout_,
|
||||
float ptSize_, FontAtlasType atlasType_);
|
||||
FontIdentifier(const std::string_view& font, FontAtlasType atlasType) : font(font), atlasType(atlasType) { assert(atlasType.IsSDF()); }
|
||||
FontIdentifier(const std::string_view& font, FontAtlasType atlasType, SubpixelLayout subpixelLayout, float ptSize)
|
||||
: font(font), atlasType(atlasType), subpixelLayout(subpixelLayout), ptSize(ptSize) {}
|
||||
|
||||
bool operator<(const FontIdentifier& other) const;
|
||||
|
||||
std::string font;
|
||||
uint32_t charsetHash = 0;
|
||||
FontAtlasType atlasType;
|
||||
SubpixelLayout subpixelLayout = SubpixelLayout::UNKNOWN;
|
||||
float ptSize = 0;
|
||||
FontAtlasType atlasType;
|
||||
};
|
||||
|
||||
static FontAtlasFactory INSTANCE;
|
||||
|
||||
Reference in New Issue
Block a user