mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-14 01:31:46 +08:00
Follow-up of 09ad6d704060a6a2a9a08771e796bc9bec09479f - Code for Mesa drivers in Windows only builds
Fixed conflicts during rebase with master
This commit is contained in:
parent
aaf0861da3
commit
96803b5384
@ -123,14 +123,14 @@ void GLCanvas3D::LayersEditing::init()
|
|||||||
{
|
{
|
||||||
glsafe(::glGenTextures(1, (GLuint*)&m_z_texture_id));
|
glsafe(::glGenTextures(1, (GLuint*)&m_z_texture_id));
|
||||||
glsafe(::glBindTexture(GL_TEXTURE_2D, m_z_texture_id));
|
glsafe(::glBindTexture(GL_TEXTURE_2D, m_z_texture_id));
|
||||||
#if ENABLE_GL_CORE_PROFILE
|
#if _WIN32 && ENABLE_GL_CORE_PROFILE
|
||||||
if (!OpenGLManager::get_gl_info().is_core_profile() || !OpenGLManager::get_gl_info().is_mesa()) {
|
if (!OpenGLManager::get_gl_info().is_core_profile() || !OpenGLManager::get_gl_info().is_mesa()) {
|
||||||
#endif // ENABLE_GL_CORE_PROFILE
|
#endif // _WIN32 && ENABLE_GL_CORE_PROFILE
|
||||||
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP));
|
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP));
|
||||||
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP));
|
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP));
|
||||||
#if ENABLE_GL_CORE_PROFILE
|
#if _WIN32 && ENABLE_GL_CORE_PROFILE
|
||||||
}
|
}
|
||||||
#endif // ENABLE_GL_CORE_PROFILE
|
#endif // _WIN32 && ENABLE_GL_CORE_PROFILE
|
||||||
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
|
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
|
||||||
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST));
|
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST));
|
||||||
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1));
|
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1));
|
||||||
|
@ -72,10 +72,12 @@ bool OpenGLManager::GLInfo::is_core_profile() const
|
|||||||
return !GLEW_ARB_compatibility;
|
return !GLEW_ARB_compatibility;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if _WIN32
|
||||||
bool OpenGLManager::GLInfo::is_mesa() const
|
bool OpenGLManager::GLInfo::is_mesa() const
|
||||||
{
|
{
|
||||||
return boost::icontains(m_version, "mesa");
|
return boost::icontains(m_version, "mesa");
|
||||||
}
|
}
|
||||||
|
#endif // _WIN32
|
||||||
#endif // ENABLE_GL_CORE_PROFILE
|
#endif // ENABLE_GL_CORE_PROFILE
|
||||||
|
|
||||||
int OpenGLManager::GLInfo::get_max_tex_size() const
|
int OpenGLManager::GLInfo::get_max_tex_size() const
|
||||||
|
@ -45,7 +45,9 @@ public:
|
|||||||
|
|
||||||
#if ENABLE_GL_CORE_PROFILE
|
#if ENABLE_GL_CORE_PROFILE
|
||||||
bool is_core_profile() const;
|
bool is_core_profile() const;
|
||||||
|
#if _WIN32
|
||||||
bool is_mesa() const;
|
bool is_mesa() const;
|
||||||
|
#endif // _WIN32
|
||||||
#endif // ENABLE_OPENGL_ES
|
#endif // ENABLE_OPENGL_ES
|
||||||
|
|
||||||
int get_max_tex_size() const;
|
int get_max_tex_size() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user