update color at picking and cleanup code from some warnings

This commit is contained in:
2019-03-11 15:35:59 +01:00
parent 373e7ad0e9
commit fda399f7dd
16 changed files with 56 additions and 63 deletions

View File

@@ -364,7 +364,7 @@ void NodeStrokePreview::draw_stroke_immediate()
ShaderManager::u_vec4(kShaderUniform::Col, { 0, 0, 0, 1 });
ShaderManager::u_float(kShaderUniform::Alpha, f.flow);
ShaderManager::u_float(kShaderUniform::Opacity, f.opacity);
auto rect = stroke_draw_samples(f.shapes, m_tex_dual);
/*auto rect =*/ stroke_draw_samples(f.shapes, m_tex_dual);
}
// copy raw stroke to tex
@@ -404,7 +404,7 @@ void NodeStrokePreview::draw_stroke_immediate()
ShaderManager::u_vec4(kShaderUniform::Col, { 0, 0, 0, 1 } /*f.col*/);
ShaderManager::u_float(kShaderUniform::Alpha, glm::max(f.flow, m_min_flow));
ShaderManager::u_float(kShaderUniform::Opacity, f.opacity);
auto rect = stroke_draw_samples(f.shapes, m_tex);
/*auto rect =*/ stroke_draw_samples(f.shapes, m_tex);
}
glActiveTexture(GL_TEXTURE3);
m_rtt_mixer.unbindTexture();
@@ -529,7 +529,7 @@ void NodeStrokePreview::draw()
void NodeStrokePreview::handle_resize(glm::vec2 old_size, glm::vec2 new_size)
{
if (m_rtt.getWidth() == new_size.x && m_rtt.getHeight() == new_size.y || !m_brush)
if ((m_rtt.getWidth() == new_size.x && m_rtt.getHeight() == new_size.y) || !m_brush)
return;
new_size *= root()->m_zoom;