mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-14 03:21:46 +08:00
Tech ENABLE_GL_CORE_PROFILE - Use thick line for layers editing profile rendering
Fixed conflicts during rebase with master
This commit is contained in:
parent
106b666e18
commit
2b8ff607bd
@ -357,7 +357,7 @@ void GLCanvas3D::LayersEditing::render_active_object_annotations(const GLCanvas3
|
|||||||
|
|
||||||
const float cnv_inv_width = 1.0f / cnv_width;
|
const float cnv_inv_width = 1.0f / cnv_width;
|
||||||
#else
|
#else
|
||||||
void GLCanvas3D::LayersEditing::render_active_object_annotations(const GLCanvas3D & canvas, const Rect & bar_rect)
|
void GLCanvas3D::LayersEditing::render_active_object_annotations(const GLCanvas3D& canvas, const Rect& bar_rect)
|
||||||
{
|
{
|
||||||
#endif // ENABLE_LEGACY_OPENGL_REMOVAL
|
#endif // ENABLE_LEGACY_OPENGL_REMOVAL
|
||||||
GLShaderProgram* shader = wxGetApp().get_shader("variable_layer_height");
|
GLShaderProgram* shader = wxGetApp().get_shader("variable_layer_height");
|
||||||
@ -501,11 +501,21 @@ void GLCanvas3D::LayersEditing::render_profile(const Rect& bar_rect)
|
|||||||
m_profile.profile.init_from(std::move(init_data));
|
m_profile.profile.init_from(std::move(init_data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ENABLE_GL_CORE_PROFILE
|
||||||
|
GLShaderProgram* shader = wxGetApp().get_shader("dashed_thick_lines");
|
||||||
|
#else
|
||||||
GLShaderProgram* shader = wxGetApp().get_shader("flat");
|
GLShaderProgram* shader = wxGetApp().get_shader("flat");
|
||||||
|
#endif // ENABLE_GL_CORE_PROFILE
|
||||||
if (shader != nullptr) {
|
if (shader != nullptr) {
|
||||||
shader->start_using();
|
shader->start_using();
|
||||||
shader->set_uniform("view_model_matrix", Transform3d::Identity());
|
shader->set_uniform("view_model_matrix", Transform3d::Identity());
|
||||||
shader->set_uniform("projection_matrix", Transform3d::Identity());
|
shader->set_uniform("projection_matrix", Transform3d::Identity());
|
||||||
|
#if ENABLE_GL_CORE_PROFILE
|
||||||
|
const std::array<int, 4>& viewport = wxGetApp().plater()->get_camera().get_viewport();
|
||||||
|
shader->set_uniform("viewport_size", Vec2d(double(viewport[2]), double(viewport[3])));
|
||||||
|
shader->set_uniform("width", 0.25f);
|
||||||
|
shader->set_uniform("gap_size", 0.0f);
|
||||||
|
#endif // ENABLE_GL_CORE_PROFILE
|
||||||
m_profile.baseline.render();
|
m_profile.baseline.render();
|
||||||
m_profile.profile.render();
|
m_profile.profile.render();
|
||||||
shader->stop_using();
|
shader->stop_using();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user