render merged layers cache

This commit is contained in:
2019-04-25 11:33:59 +02:00
parent 5a1f6e48ce
commit 2da84ec63d
4 changed files with 597 additions and 255 deletions

View File

@@ -167,6 +167,7 @@ public:
std::unique_ptr<Stroke> m_dual_stroke;
bool m_show_tmp = false;
std::vector<std::unique_ptr<Layer>> m_layers;
Layer m_layers_merge;
std::vector<int> m_order;
std::vector<glm::vec2> m_plane_shape[6]; // screen space projection of the plane
glm::mat4 m_plane_unproject[6] = SIXPLETTE(glm::mat4(1));
@@ -184,6 +185,8 @@ public:
Texture2D m_brush_mix;
Texture2D m_tex[6];
Texture2D m_tex2[6];
RTT m_merge_rtt;
Texture2D m_merge_tex;
bool m_pick_ready[6];
std::unique_ptr<glm::u8vec4[]> m_pick_data[6] = SIXPLETTE(nullptr);
static glm::vec3 m_plane_origin[6];
@@ -247,6 +250,7 @@ public:
void stroke_end();
void stroke_cancel();
void stroke_commit();
void draw_merge(std::array<bool, 6> faces = SIXPLETTE(true));
void clear(const glm::vec4& color = { 1, 1, 1, 0 });
void clear_all();
void pick_start();