mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
Speed up the rendering of triangles in painting gizmos by only copying triangle data to the GPU when triangles were changed by painting.
This commit is contained in:
parent
28219142c5
commit
c0092a7b0a
6 changed files with 92 additions and 51 deletions
|
@ -38,13 +38,20 @@ public:
|
|||
virtual void render(ImGuiWrapper *imgui);
|
||||
void render() { this->render(nullptr); }
|
||||
|
||||
void request_update_render_data() { m_update_render_data = true; };
|
||||
|
||||
#ifdef PRUSASLICER_TRIANGLE_SELECTOR_DEBUG
|
||||
void render_debug(ImGuiWrapper* imgui);
|
||||
bool m_show_triangles{false};
|
||||
bool m_show_invalid{false};
|
||||
#endif
|
||||
|
||||
protected:
|
||||
bool m_update_render_data = false;
|
||||
|
||||
private:
|
||||
void update_render_data();
|
||||
|
||||
GLIndexedVertexArray m_iva_enforcers;
|
||||
GLIndexedVertexArray m_iva_blockers;
|
||||
std::array<GLIndexedVertexArray, 3> m_varrays;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue