enable rtt dtor, default values for <text> node, dual-brush wip, more brush options

This commit is contained in:
2019-02-14 02:08:29 +01:00
parent 8ad005de8b
commit 999723dd14
26 changed files with 998 additions and 389 deletions

View File

@@ -161,6 +161,7 @@ public:
bool m_use_instanced = false;
int m_current_layer_idx = 0;
std::unique_ptr<Stroke> m_current_stroke;
std::unique_ptr<Stroke> m_dual_stroke;
bool m_show_tmp = false;
std::vector<Layer> m_layers;
std::vector<int> m_order;
@@ -172,10 +173,9 @@ public:
Layer m_smask; // selection mask
bool m_smask_active = false;
RTT m_tmp[6];
RTT m_tmp_dual[6];
RTT m_mixer;
float m_mixer_scale = 1;
StrokeSample m_mixer_sample;
bool m_mixer_idle = true;
Texture2D m_brush_mix;
Texture2D m_tex[6];
Texture2D m_tex2[6];
@@ -200,6 +200,7 @@ public:
glm::vec2 m_cur_pos;
std::shared_ptr<Brush> m_current_brush;
std::shared_ptr<Brush> m_dual_brush;
static std::vector<CanvasMode*> modes[];
std::vector<CanvasMode*>* m_mode = nullptr;
@@ -229,12 +230,13 @@ public:
void layer_add(std::string name);
void layer_order(int idx, int pos);
void layer_merge(int source_idx, int dest_idx);
void stroke_start(glm::vec3 point, float pressure, const std::shared_ptr<Brush>& brush);
void stroke_start(glm::vec3 point, float pressure);
void stroke_update(glm::vec3 point, float pressure);
void stroke_draw_mix(const glm::vec2& bb_min, const glm::vec2& bb_sz);
std::array<std::vector<vertex_t>, 6> stroke_draw_project(std::array<vertex_t, 4>& B);
void stroke_draw_samples(int i, std::vector<vertex_t>& P);
std::vector<StrokeFrame> stroke_draw_compute();
std::array<std::vector<vertex_t>, 6> stroke_draw_project(std::array<vertex_t, 4>& B) const;
// return rect {origin, size}
glm::vec4 stroke_draw_samples(int i, std::vector<vertex_t>& P);
std::vector<StrokeFrame> stroke_draw_compute(Stroke& stroke) const;
void stroke_draw();
void stroke_end();
void stroke_cancel();