FIX: enable wireframe in paint tool

Jira: STUDIO-3996

The buffer data submitted when the wireframe function is closed is half less than the buffer data submitted when the wireframe function is open

Change-Id: I92542190a5a45f562ec89d7c41fef3cdf1c26418
(cherry picked from commit b95650954f8bdb0cf81a2063efba4b2fced13a2f)
This commit is contained in:
zhou.xu
2023-09-11 15:23:29 +08:00
committed by Lane.Wei
parent 5225e8d891
commit 5658d32633
6 changed files with 40 additions and 28 deletions

View File

@@ -77,13 +77,13 @@ std::pair<bool, std::string> GLShadersManager::init()
//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_wireframe.vs", "mm_gouraud_wireframe.fs"}, {"FLIP_TRIANGLE_NORMALS"sv});//{"mm_gouraud.vs", "mm_gouraud.fs"}
}
else {
//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_wireframe.vs", "mm_gouraud_wireframe.fs"});//{"mm_gouraud.vs", "mm_gouraud.fs"}
}
//BBS: add shader for outline