implement brush presets save and restore from file, fix stencil nullptr, limit preview stroke max size
This commit is contained in:
@@ -201,7 +201,6 @@ void NodeCanvas::draw()
|
||||
else if(m_canvas->m_current_stroke && m_canvas->m_show_tmp && m_canvas->m_current_layer_idx == layer_index)
|
||||
{
|
||||
m_sampler.bind(0);
|
||||
auto& paper = *m_canvas->m_current_stroke->m_brush->m_stencil_texture;
|
||||
ShaderManager::use(kShader::CompDraw);
|
||||
ShaderManager::u_int(kShaderUniform::Tex, 0);
|
||||
ShaderManager::u_int(kShaderUniform::TexStroke, 1);
|
||||
@@ -222,9 +221,13 @@ void NodeCanvas::draw()
|
||||
glActiveTexture(GL_TEXTURE2);
|
||||
m_canvas->m_smask.m_rtt[plane_index].bindTexture();
|
||||
glActiveTexture(GL_TEXTURE3);
|
||||
paper.bind();
|
||||
if (m_canvas->m_current_stroke->m_brush->m_stencil_texture)
|
||||
m_canvas->m_current_stroke->m_brush->m_stencil_texture->bind();
|
||||
else
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
m_face_plane.draw_fill();
|
||||
paper.unbind();
|
||||
if (m_canvas->m_current_stroke->m_brush->m_stencil_texture)
|
||||
m_canvas->m_current_stroke->m_brush->m_stencil_texture->unbind();
|
||||
glActiveTexture(GL_TEXTURE2);
|
||||
m_canvas->m_smask.m_rtt[plane_index].unbindTexture();
|
||||
glActiveTexture(GL_TEXTURE1);
|
||||
|
||||
Reference in New Issue
Block a user