ENABLE_ANISOTROPIC_FILTER_ON_BED_TEXTURES set as default

This commit is contained in:
Enrico Turri 2019-02-20 13:53:33 +01:00
parent e2731416bf
commit 0b0457186b
2 changed files with 2 additions and 8 deletions

View File

@ -38,8 +38,6 @@
#define ENABLE_MOVE_MIN_THRESHOLD (1 && ENABLE_1_42_0_ALPHA4)
// Modified initial default placement of generic subparts
#define ENABLE_GENERIC_SUBPARTS_PLACEMENT (1 && ENABLE_1_42_0_ALPHA4)
// Use anisotropic filtering on bed plate texture
#define ENABLE_ANISOTROPIC_FILTER_ON_BED_TEXTURES (1 && ENABLE_1_42_0_ALPHA4)
// Bunch of fixes related to volumes centering
#define ENABLE_VOLUMES_CENTERING_FIXES (1 && ENABLE_1_42_0_ALPHA4)

View File

@ -367,12 +367,10 @@ void Bed3D::render_prusa(const std::string &key, float theta, bool useVBOs) cons
std::string model_path = resources_dir() + "/models/" + key;
#if ENABLE_ANISOTROPIC_FILTER_ON_BED_TEXTURES
// use anisotropic filter if graphic card allows
GLfloat max_anisotropy = 0.0f;
if (glewIsSupported("GL_EXT_texture_filter_anisotropic"))
::glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &max_anisotropy);
#endif // ENABLE_ANISOTROPIC_FILTER_ON_BED_TEXTURES
std::string filename = tex_path + "_top.png";
if ((m_top_texture.get_id() == 0) || (m_top_texture.get_source() != filename))
@ -382,14 +380,13 @@ void Bed3D::render_prusa(const std::string &key, float theta, bool useVBOs) cons
render_custom();
return;
}
#if ENABLE_ANISOTROPIC_FILTER_ON_BED_TEXTURES
if (max_anisotropy > 0.0f)
{
glsafe(::glBindTexture(GL_TEXTURE_2D, m_top_texture.get_id()));
glsafe(::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, max_anisotropy));
glsafe(::glBindTexture(GL_TEXTURE_2D, 0));
}
#endif // ENABLE_ANISOTROPIC_FILTER_ON_BED_TEXTURES
}
filename = tex_path + "_bottom.png";
@ -400,14 +397,13 @@ void Bed3D::render_prusa(const std::string &key, float theta, bool useVBOs) cons
render_custom();
return;
}
#if ENABLE_ANISOTROPIC_FILTER_ON_BED_TEXTURES
if (max_anisotropy > 0.0f)
{
glsafe(::glBindTexture(GL_TEXTURE_2D, m_bottom_texture.get_id()));
glsafe(::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, max_anisotropy));
glsafe(::glBindTexture(GL_TEXTURE_2D, 0));
}
#endif // ENABLE_ANISOTROPIC_FILTER_ON_BED_TEXTURES
}
if (theta <= 90.0f)