diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2019-05-28 13:53:16 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2019-05-28 13:53:16 +0300 |
commit | 886da08f89f8d9a4a2149c2784305b18a24ac5f3 (patch) | |
tree | 0f4db7066c011667014f6f93bfdb3995222f3a94 /src/slic3r/GUI/GLToolbar.cpp | |
parent | 61c41aa90f5e9c9ed7b077d1fc15e22167a5576d (diff) |
Texture compression set as an option
Diffstat (limited to 'src/slic3r/GUI/GLToolbar.cpp')
-rw-r--r-- | src/slic3r/GUI/GLToolbar.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/slic3r/GUI/GLToolbar.cpp b/src/slic3r/GUI/GLToolbar.cpp index 00cbdfec7..813a319b8 100644 --- a/src/slic3r/GUI/GLToolbar.cpp +++ b/src/slic3r/GUI/GLToolbar.cpp @@ -194,7 +194,11 @@ bool GLToolbar::init(const ItemsIconsTexture::Metadata& icons_texture, const Bac #endif // ENABLE_SVG_ICONS if (!background_texture.filename.empty()) +#if ENABLE_COMPRESSED_TEXTURES + res = m_background_texture.texture.load_from_file(path + background_texture.filename, false, true); +#else res = m_background_texture.texture.load_from_file(path + background_texture.filename, false); +#endif // ENABLE_COMPRESSED_TEXTURES if (res) m_background_texture.metadata = background_texture; @@ -1338,7 +1342,11 @@ bool GLToolbar::generate_icons_texture() const states.push_back(std::make_pair(1, true)); } +#if ENABLE_COMPRESSED_TEXTURES + bool res = m_icons_texture.load_from_svg_files_as_sprites_array(filenames, states, (unsigned int)(m_layout.icons_size * m_layout.scale), true); +#else bool res = m_icons_texture.load_from_svg_files_as_sprites_array(filenames, states, (unsigned int)(m_layout.icons_size * m_layout.scale)); +#endif // ENABLE_COMPRESSED_TEXTURES if (res) m_icons_texture_dirty = false; |