Forces even size and disable compression for toolbar icon texture to try to solve artifacts on OsX Catalina
This commit is contained in:
parent
26eaa8af1e
commit
c370bb7141
@ -1194,7 +1194,12 @@ bool GLToolbar::generate_icons_texture() const
|
||||
states.push_back(std::make_pair(1, true));
|
||||
}
|
||||
|
||||
bool res = m_icons_texture.load_from_svg_files_as_sprites_array(filenames, states, (unsigned int)(m_layout.icons_size * m_layout.scale), true);
|
||||
unsigned int sprite_size_px = (unsigned int)(m_layout.icons_size * m_layout.scale);
|
||||
// force even size
|
||||
if (sprite_size_px % 2 != 0)
|
||||
sprite_size_px += 1;
|
||||
|
||||
bool res = m_icons_texture.load_from_svg_files_as_sprites_array(filenames, states, sprite_size_px, false);
|
||||
if (res)
|
||||
m_icons_texture_dirty = false;
|
||||
|
||||
|
@ -955,7 +955,12 @@ bool GLGizmosManager::generate_icons_texture() const
|
||||
states.push_back(std::make_pair(0, false));
|
||||
states.push_back(std::make_pair(0, true));
|
||||
|
||||
bool res = m_icons_texture.load_from_svg_files_as_sprites_array(filenames, states, (unsigned int)(m_overlay_icons_size * m_overlay_scale), true);
|
||||
unsigned int sprite_size_px = (unsigned int)(m_overlay_icons_size * m_overlay_scale);
|
||||
// force even size
|
||||
if (sprite_size_px % 2 != 0)
|
||||
sprite_size_px += 1;
|
||||
|
||||
bool res = m_icons_texture.load_from_svg_files_as_sprites_array(filenames, states, sprite_size_px, false);
|
||||
if (res)
|
||||
m_icons_texture_dirty = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user