FIX: rendering as wireframe mode
jira: STUDIO-7952 Change-Id: I47d7498a9bb7d8220beab9f2fefb14c7de337e81 (cherry picked from commit 5f6cd474d5e8b48c63a8ecc60b2c119beccd6491)
This commit is contained in:
parent
8c396b3d9d
commit
672f81a3dc
|
@ -1330,9 +1330,8 @@ float TriangleSelectorPatch::gap_area = TriangleSelectorPatch::GapAreaMin;
|
|||
|
||||
void TriangleSelectorPatch::render(ImGuiWrapper* imgui)
|
||||
{
|
||||
static bool last_show_wireframe = false;
|
||||
if (last_show_wireframe != wxGetApp().plater()->is_show_wireframe()) {
|
||||
last_show_wireframe = wxGetApp().plater()->is_show_wireframe();
|
||||
if (m_cached_wireframe_mode != wxGetApp().plater()->is_show_wireframe()) {
|
||||
m_cached_wireframe_mode = wxGetApp().plater()->is_show_wireframe();
|
||||
m_update_render_data = true;
|
||||
m_paint_changed = true;
|
||||
}
|
||||
|
@ -1681,8 +1680,8 @@ void TriangleSelectorPatch::render(int triangle_indices_idx, int position_id, bo
|
|||
glsafe(::glDisableClientState(GL_VERTEX_ARRAY));
|
||||
if ((this->m_triangle_indices_sizes[triangle_indices_idx] > 0)&&(position_id != -1))
|
||||
glsafe(::glDisableVertexAttribArray(position_id));
|
||||
if ((this->m_triangle_indices_sizes[triangle_indices_idx] > 0)&&show_wireframe) {
|
||||
glsafe(::glEnableClientState(GL_COLOR_ARRAY));
|
||||
if ((this->m_triangle_indices_sizes[triangle_indices_idx] > 0)&&show_wireframe) {
|
||||
glsafe(::glDisableClientState(GL_COLOR_ARRAY));
|
||||
}
|
||||
if (this->m_triangle_indices_sizes[triangle_indices_idx] > 0)
|
||||
glsafe(::glBindBuffer(GL_ARRAY_BUFFER, 0));
|
||||
|
|
|
@ -198,6 +198,7 @@ protected:
|
|||
std::vector<std::array<float, 4>> m_ebt_colors;
|
||||
|
||||
bool m_filter_state = false;
|
||||
bool m_cached_wireframe_mode = false;
|
||||
|
||||
private:
|
||||
void update_render_data();
|
||||
|
|
Loading…
Reference in New Issue