Tech ENABLE_GL_CORE_PROFILE - Added command line option '--opengl-core=M.m' which allows the user to select a specific OpenGL version supporting core profile

This commit is contained in:
enricoturri1966 2022-05-30 16:15:25 +02:00
parent a1eb8c5cbd
commit 8d0780aabe
20 changed files with 180 additions and 61 deletions

View file

@ -864,9 +864,10 @@ void Bed3D::render_default(bool bottom, bool picking, bool show_texture)
if (!picking && show_texture) {
// draw grid
#if !ENABLE_GL_CORE_PROFILE
glsafe(::glLineWidth(1.5f * m_scale_factor));
#endif // !ENABLE_GL_CORE_PROFILE
#if ENABLE_GL_CORE_PROFILE
if (!OpenGLManager::get_gl_info().is_core_profile())
#endif // ENABLE_GL_CORE_PROFILE
glsafe(::glLineWidth(1.5f * m_scale_factor));
m_gridlines.set_color(has_model && !bottom ? DEFAULT_SOLID_GRID_COLOR : DEFAULT_TRANSPARENT_GRID_COLOR);
m_gridlines.render();
}
@ -931,7 +932,10 @@ void Bed3D::render_contour(const Transform3d& view_matrix, const Transform3d& pr
glsafe(::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
// draw contour
glsafe(::glLineWidth(1.5f * m_scale_factor));
#if ENABLE_GL_CORE_PROFILE
if (!OpenGLManager::get_gl_info().is_core_profile())
#endif // ENABLE_GL_CORE_PROFILE
glsafe(::glLineWidth(1.5f * m_scale_factor));
m_contourlines.render();
glsafe(::glDisable(GL_BLEND));