Tech ENABLE_GLBEGIN_GLEND_REMOVAL - Removed Slic3r::GUI::GLPaintContour from GLGizmoPainterBase.hpp/.cpp and replaced with GLModel
This commit is contained in:
parent
81e9582761
commit
df3d670357
3 changed files with 85 additions and 9 deletions
|
@ -589,6 +589,9 @@ void TriangleSelectorMmGui::render(ImGuiWrapper *imgui)
|
|||
m_gizmo_scene.render(color_idx);
|
||||
}
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
render_paint_contour();
|
||||
#else
|
||||
if (m_paint_contour.has_VBO()) {
|
||||
ScopeGuard guard_mm_gouraud([shader]() { shader->start_using(); });
|
||||
shader->stop_using();
|
||||
|
@ -602,6 +605,7 @@ void TriangleSelectorMmGui::render(ImGuiWrapper *imgui)
|
|||
|
||||
contour_shader->stop_using();
|
||||
}
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
m_update_render_data = false;
|
||||
}
|
||||
|
@ -636,6 +640,9 @@ void TriangleSelectorMmGui::update_render_data()
|
|||
|
||||
m_gizmo_scene.finalize_triangle_indices();
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
update_paint_contour();
|
||||
#else
|
||||
m_paint_contour.release_geometry();
|
||||
std::vector<Vec2i> contour_edges = this->get_seed_fill_contour();
|
||||
m_paint_contour.contour_vertices.reserve(contour_edges.size() * 6);
|
||||
|
@ -654,6 +661,7 @@ void TriangleSelectorMmGui::update_render_data()
|
|||
m_paint_contour.contour_indices_size = m_paint_contour.contour_indices.size();
|
||||
|
||||
m_paint_contour.finalize_geometry();
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
}
|
||||
|
||||
wxString GLGizmoMmuSegmentation::handle_snapshot_action_name(bool shift_down, GLGizmoPainterBase::Button button_down) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue