diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2019-05-23 14:49:57 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2019-05-23 14:49:57 +0300 |
commit | 3aa14bddf519bc86d907421c56012d27c9bc3bb9 (patch) | |
tree | f2068f78c3e597ffa776985252b5f82253afac02 /src/slic3r/GUI/3DBed.cpp | |
parent | 4504569f8e5765e53607beecb97da5fec1d98d0c (diff) |
Max texture size dependent on OpenGL version on Win and Linux and on retina monitors on Mac
Diffstat (limited to 'src/slic3r/GUI/3DBed.cpp')
-rw-r--r-- | src/slic3r/GUI/3DBed.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/slic3r/GUI/3DBed.cpp b/src/slic3r/GUI/3DBed.cpp index 8392e534a..2f20a65d9 100644 --- a/src/slic3r/GUI/3DBed.cpp +++ b/src/slic3r/GUI/3DBed.cpp @@ -493,6 +493,13 @@ void Bed3D::render_prusa(const std::string &key, bool bottom) const std::string model_path = resources_dir() + "/models/" + key; +#if ENABLE_TEXTURES_MAXSIZE_DEPENDENT_ON_OPENGL_VERSION + // use anisotropic filter if graphic card allows + GLfloat max_anisotropy = GLCanvas3DManager::get_gl_info().get_max_anisotropy(); + + // use higher resolution images if graphic card and opengl version allow + GLint max_tex_size = GLCanvas3DManager::get_gl_info().get_max_tex_size(); +#else // use anisotropic filter if graphic card allows GLfloat max_anisotropy = 0.0f; if (glewIsSupported("GL_EXT_texture_filter_anisotropic")) @@ -504,6 +511,7 @@ void Bed3D::render_prusa(const std::string &key, bool bottom) const // clamp or the texture generation becomes too slow max_tex_size = std::min(max_tex_size, 8192); +#endif // ENABLE_TEXTURES_MAXSIZE_DEPENDENT_ON_OPENGL_VERSION std::string filename = tex_path + ".svg"; |