non linear slider for brush tip control

This commit is contained in:
2017-05-31 07:46:40 +01:00
parent 0f721393bb
commit 7495972763
3 changed files with 19 additions and 4 deletions

View File

@@ -65,8 +65,10 @@ void NodeStrokePreview::draw_stroke()
glEnable(GL_BLEND);
glm::mat4 proj = glm::ortho<float>(0, (float)m_rtt.getWidth(), 0, (float)m_rtt.getHeight(), -1, 1);
auto b = m_brush;
b.m_tip_size *= .7f; // reduce the size in the preview
m_stroke.reset();
m_stroke.start(m_brush);
m_stroke.start(b);
auto samples = m_stroke.compute_samples();
auto& tex = TextureManager::get(m_brush.m_tex_id);
tex.bind();