pen state and buttons color when active
This commit is contained in:
@@ -88,7 +88,7 @@ void ui::Canvas::stroke_draw()
|
||||
else
|
||||
{
|
||||
glDisable(GL_BLEND);
|
||||
if (m_erase)
|
||||
if (m_state == kPenState::Erase)
|
||||
{
|
||||
ShaderManager::use(ui::kShader::StrokeErase);
|
||||
//ShaderManager::u_vec4(kShaderUniform::Col, m_brush.m_tip_color);
|
||||
@@ -275,7 +275,7 @@ void ui::Canvas::stroke_commit()
|
||||
m_tex2[i].bind();
|
||||
m_sampler.bind(0);
|
||||
m_sampler_bg.bind(1);
|
||||
if (m_erase)
|
||||
if (m_state == kPenState::Erase)
|
||||
{
|
||||
ShaderManager::use(ui::kShader::Texture);
|
||||
}
|
||||
@@ -324,7 +324,7 @@ void ui::Canvas::stroke_start(glm::vec2 point, float pressure, const ui::Brush&
|
||||
m_dirty_box[i] = glm::vec4(m_width, m_height, 0, 0); // reset bounding box
|
||||
m_dirty_face[i] = false;
|
||||
|
||||
if (m_erase)
|
||||
if (m_state == kPenState::Erase)
|
||||
{
|
||||
m_layers[m_current_layer_idx].m_rtt[i].bindFramebuffer();
|
||||
m_tmp[i].bindTexture();
|
||||
|
||||
Reference in New Issue
Block a user