bind zero when texture is not defined for dual brush or pattern to avoid using the previous tex in slot

This commit is contained in:
2019-02-26 16:23:51 +01:00
parent 451406c17c
commit cedb8bc3fe
4 changed files with 27 additions and 18 deletions

View File

@@ -242,8 +242,9 @@ void NodeCanvas::draw()
if (b->m_dual_enabled)
m_canvas->m_tmp_dual[plane_index].bindTexture();
glActiveTexture(GL_TEXTURE4);
if (b->m_pattern_texture)
b->m_pattern_texture->bind();
b->m_pattern_texture ?
b->m_pattern_texture->bind() :
glBindTexture(GL_TEXTURE_2D, 0);
m_face_plane.draw_fill();
glActiveTexture(GL_TEXTURE3);
if (b->m_dual_enabled)