cleanup
This commit is contained in:
@@ -424,8 +424,26 @@ void Canvas::stroke_draw()
|
||||
auto bb_sz = bb_max - bb_min;
|
||||
|
||||
if (m_brush.m_tip_mix > 0.f)
|
||||
{
|
||||
stroke_draw_mix(bb_min, bb_sz);
|
||||
|
||||
glViewport(0, 0, m_width, m_height);
|
||||
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
tex.bind();
|
||||
m_sampler_brush.bind(0);
|
||||
m_sampler_bg.bind(1);
|
||||
m_sampler_stencil.bind(2);
|
||||
m_sampler.bind(3);
|
||||
//m_sampler_linear.bind(5);
|
||||
|
||||
glActiveTexture(GL_TEXTURE2);
|
||||
stencil.bind();
|
||||
glActiveTexture(GL_TEXTURE3);
|
||||
m_mixer.bindTexture();
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
// check if plane is even visible
|
||||
@@ -529,7 +547,7 @@ void Canvas::stroke_draw()
|
||||
glm::max(zw(m_dirty_box[i]), (glm::vec2)(tex_pos + tex_sz))
|
||||
);
|
||||
|
||||
//ShaderManager::use(kShader::Stroke);
|
||||
ShaderManager::use(kShader::Stroke);
|
||||
ShaderManager::u_mat4(kShaderUniform::MVP, ortho_proj);
|
||||
ShaderManager::u_vec4(kShaderUniform::Col, glm::vec4(s.col, m_brush.m_tip_color.a));
|
||||
ShaderManager::u_float(kShaderUniform::Alpha, s.flow);
|
||||
|
||||
Reference in New Issue
Block a user