code refactoring
This commit is contained in:
@@ -149,6 +149,10 @@ namespace OpenVulkano::Scene
|
||||
m_cfg = config;
|
||||
m_uniBuffer.Init(sizeof(TextConfig), &m_cfg, 3);
|
||||
m_uniBuffer.binding.stageFlags = ShaderProgramType::FRAGMENT;
|
||||
if (m_atlasData->meta.atlasType == FontAtlasType::BITMAP)
|
||||
{
|
||||
m_material.texture->m_samplerConfig = &SamplerConfig::NEAREST;
|
||||
}
|
||||
}
|
||||
|
||||
TextDrawable::TextDrawable(const std::shared_ptr<AtlasData>& atlasData, const TextConfig& config)
|
||||
@@ -268,10 +272,6 @@ namespace OpenVulkano::Scene
|
||||
++i;
|
||||
}
|
||||
m_bbox.Init(bmin, bmax);
|
||||
if (m_atlasData->meta.atlasType == FontAtlasType::BITMAP)
|
||||
{
|
||||
m_material.texture->m_samplerConfig = &SamplerConfig::NEAREST;
|
||||
}
|
||||
SimpleDrawable::Init(m_shader, &m_geometry, &m_material, &m_uniBuffer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user