add free and poly selection mask tools, fix some threading gl problems

This commit is contained in:
2017-10-24 14:20:12 +01:00
parent 2a92beca7b
commit b40a5b656b
9 changed files with 197 additions and 137 deletions

View File

@@ -92,6 +92,19 @@ public:
};
class CanvasModeFill : public CanvasMode
{
ui::DynamicShape m_shape;
bool m_dragging = false;
std::vector<ui::Shape::vertex_t> m_points;
std::map<int, int> m_dirty_planes;
public:
virtual void on_Draw(const glm::mat4& ortho, const glm::mat4& proj, const glm::mat4& camera) override;
virtual void on_MouseEvent(MouseEvent* me, glm::vec2& loc) override;
virtual void init() override;
virtual void leave() override;
};
class CanvasModeMaskFree : public CanvasMode
{
ui::DynamicShape m_shape;
bool m_dragging = false;