Cleanup shelf and silence warnings

This commit is contained in:
Georg Hagen
2025-02-11 21:59:57 +01:00
parent b4ffd7ce41
commit af9de9c2af
3 changed files with 54 additions and 46 deletions

View File

@@ -47,7 +47,7 @@ namespace OpenVulkano::Scene
}
auto [allGlyphs, atlasWidth] = InitGlyphsForPacking(chset, face);
std::vector<Shelf> shelves = Shelf::CreateShelves(atlasWidth, allGlyphs, face, m_channelsCount);
std::vector<Shelf> shelves = Shelf::CreateShelves(atlasWidth, allGlyphs, face.get(), m_channelsCount);
uint32_t atlasHeight = 0;
std::for_each(shelves.begin(), shelves.end(), [&](const Shelf& shelf) { atlasHeight += shelf.GetHeight(); });
const Math::Vector2ui atlasResolution = { atlasWidth, atlasHeight };
@@ -183,7 +183,7 @@ namespace OpenVulkano::Scene
void BitmapFontAtlasGenerator::FillSubpixelData(const FT_Bitmap& bitmap, const GlyphForPacking& glyph)
{
Texture* tex = m_atlasData->GetTexture();
char* texBuffer = static_cast<char*>(tex->textureBuffer);
uint8_t* texBuffer = static_cast<uint8_t*>(tex->textureBuffer);
if (m_subpixelLayout.IsHorizontalSubpixelLayout())
{
// RGB RGB RGB