Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2019-05-23 14:49:57 +0300
committerEnrico Turri <enricoturri@seznam.cz>2019-05-23 14:49:57 +0300
commit3aa14bddf519bc86d907421c56012d27c9bc3bb9 (patch)
treef2068f78c3e597ffa776985252b5f82253afac02 /src/slic3r/GUI/3DBed.cpp
parent4504569f8e5765e53607beecb97da5fec1d98d0c (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.cpp8
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";