ENH: disable wireframe currently for some macos has performance issue
Change-Id: I7646927352b0097e1a7b4fa97da4730976996b80
This commit is contained in:
parent
aff6fb934c
commit
8b5a49f378
|
@ -71,16 +71,16 @@ std::pair<bool, std::string> GLShadersManager::init()
|
|||
// Since macOS 12 (Monterey), this issue with the opposite direction on Apple's Arm CPU seems to be fixed, and computed
|
||||
// triangle normals inside fragment shader have the right direction.
|
||||
if (platform_flavor() == PlatformFlavor::OSXOnArm && wxPlatformInfo::Get().GetOSMajorVersion() < 12) {
|
||||
//if (GUI::wxGetApp().is_gl_version_greater_or_equal_to(3, 0))
|
||||
valid &= append_shader("mm_gouraud", {"mm_gouraud_wireframe.vs", "mm_gouraud_wireframe.fs"}, {"FLIP_TRIANGLE_NORMALS"sv});
|
||||
//if (GUI::wxGetApp().plater() && GUI::wxGetApp().plater()->is_wireframe_enabled())
|
||||
// valid &= append_shader("mm_gouraud", {"mm_gouraud_wireframe.vs", "mm_gouraud_wireframe.fs"}, {"FLIP_TRIANGLE_NORMALS"sv});
|
||||
//else
|
||||
// valid &= append_shader("mm_gouraud", {"mm_gouraud.vs", "mm_gouraud.fs"}, {"FLIP_TRIANGLE_NORMALS"sv});
|
||||
valid &= append_shader("mm_gouraud", {"mm_gouraud.vs", "mm_gouraud.fs"}, {"FLIP_TRIANGLE_NORMALS"sv});
|
||||
}
|
||||
else {
|
||||
//if (GUI::wxGetApp().is_gl_version_greater_or_equal_to(3, 0))
|
||||
valid &= append_shader("mm_gouraud", {"mm_gouraud_wireframe.vs", "mm_gouraud_wireframe.fs"});
|
||||
//if (GUI::wxGetApp().plater() && GUI::wxGetApp().plater()->is_wireframe_enabled())
|
||||
// valid &= append_shader("mm_gouraud", {"mm_gouraud_wireframe.vs", "mm_gouraud_wireframe.fs"});
|
||||
//else
|
||||
// valid &= append_shader("mm_gouraud", {"mm_gouraud.vs", "mm_gouraud.fs"});
|
||||
valid &= append_shader("mm_gouraud", {"mm_gouraud.vs", "mm_gouraud.fs"});
|
||||
}
|
||||
|
||||
//BBS: add shader for outline
|
||||
|
|
|
@ -321,16 +321,16 @@ void GLGizmoMmuSegmentation::show_tooltip_information(float caption_max, float x
|
|||
std::vector<std::string> tip_items;
|
||||
switch (m_tool_type) {
|
||||
case ToolType::BRUSH:
|
||||
tip_items = {"paint", "erase", "cursor_size", "clipping_of_view", "toggle_wireframe"};
|
||||
tip_items = {"paint", "erase", "cursor_size", "clipping_of_view"};
|
||||
break;
|
||||
case ToolType::BUCKET_FILL:
|
||||
tip_items = {"paint", "erase", "smart_fill_angle", "clipping_of_view", "toggle_wireframe"};
|
||||
tip_items = {"paint", "erase", "smart_fill_angle", "clipping_of_view"};
|
||||
break;
|
||||
case ToolType::SMART_FILL:
|
||||
// TODO:
|
||||
break;
|
||||
case ToolType::GAP_FILL:
|
||||
tip_items = {"gap_area", "toggle_wireframe"};
|
||||
tip_items = {"gap_area"};
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -357,7 +357,7 @@ void GLGizmoMmuSegmentation::on_render_input_window(float x, float y, float bott
|
|||
|
||||
// First calculate width of all the texts that are could possibly be shown. We will decide set the dialog width based on that:
|
||||
const float space_size = m_imgui->get_style_scaling() * 8;
|
||||
const float clipping_slider_left = std::max(m_imgui->calc_text_size(m_desc.at("clipping_of_view")).x + m_imgui->scaled(1.5f),
|
||||
const float clipping_slider_left = std::max(m_imgui->calc_text_size(m_desc.at("clipping_of_view")).x + m_imgui->scaled(1.5f),
|
||||
m_imgui->calc_text_size(m_desc.at("reset_direction")).x + m_imgui->scaled(1.5f) + ImGui::GetStyle().FramePadding.x * 2);
|
||||
const float cursor_slider_left = m_imgui->calc_text_size(m_desc.at("cursor_size")).x + m_imgui->scaled(1.5f);
|
||||
const float smart_fill_slider_left = m_imgui->calc_text_size(m_desc.at("smart_fill_angle")).x + m_imgui->scaled(1.5f);
|
||||
|
|
|
@ -1082,7 +1082,7 @@ void Sidebar::update_presets(Preset::Type preset_type)
|
|||
Tab* print_tab = wxGetApp().get_tab(Preset::TYPE_PRINT);
|
||||
if (print_tab) {
|
||||
print_tab->get_combo_box()->update();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Preset::TYPE_SLA_PRINT:
|
||||
|
@ -1097,7 +1097,7 @@ void Sidebar::update_presets(Preset::Type preset_type)
|
|||
{
|
||||
update_all_preset_comboboxes();
|
||||
p->show_preset_comboboxes();
|
||||
|
||||
|
||||
/* update bed shape */
|
||||
Tab* printer_tab = wxGetApp().get_tab(Preset::TYPE_PRINTER);
|
||||
if (printer_tab) {
|
||||
|
@ -7344,6 +7344,7 @@ Plater::Plater(wxWindow *parent, MainFrame *main_frame)
|
|||
, p(new priv(this, main_frame))
|
||||
{
|
||||
// Initialization performed in the private c-tor
|
||||
enable_wireframe(false);
|
||||
}
|
||||
|
||||
bool Plater::Show(bool show)
|
||||
|
|
Loading…
Reference in New Issue