ENH: wireframe: refine the rendering logic under paint

1. remove wireframe in 3d view, only keep in paint;
2. pass barycentric_coordinates from outside
3. add shortcut hints

Change-Id: I911e5cdf3475926d9527dc0839fdce072ed54746
(cherry picked from commit 6e16d0ccfb71741e55daabd757be9f9e7613e695)
This commit is contained in:
lane.wei 2022-10-25 15:55:35 +08:00 committed by Lane.Wei
parent 79b5c94f4f
commit a9a228d071
9 changed files with 137 additions and 39 deletions

View file

@ -73,6 +73,8 @@ public:
// to be already set.
virtual void render(ImGuiWrapper *imgui);
void render() { this->render(nullptr); }
void set_wireframe_needed(bool need_wireframe) { m_need_wireframe = need_wireframe; }
bool get_wireframe_needed() { return m_need_wireframe; }
// BBS
void request_update_render_data(bool paint_changed = false)
@ -108,6 +110,7 @@ private:
protected:
GLPaintContour m_paint_contour;
bool m_need_wireframe {false};
};
// BBS
@ -198,7 +201,7 @@ protected:
private:
void update_render_data();
void render(int buffer_idx);
void render(int buffer_idx, int position_id = -1, int barycentric_id = -1);
};