fix rendering issue when layer blending mode is used

This commit is contained in:
2019-09-03 08:05:53 +02:00
parent 18bd3e6d27
commit 44bbb02aa1

View File

@@ -182,6 +182,7 @@ void NodeCanvas::draw()
if (use_blend)
{
glViewport(0, 0, m_cache_rtt.getWidth(), m_cache_rtt.getHeight());
m_cache_rtt.bindFramebuffer();
m_cache_rtt.clear({ 1, 1, 1, 0 });
}
@@ -398,6 +399,10 @@ void NodeCanvas::draw()
if (use_blend)
{
m_cache_rtt.unbindFramebuffer();
if (m_density != 1.f)
glViewport(0, 0, m_rtt.getWidth(), m_rtt.getHeight());
else
glViewport(c.x + App::I->off_x, c.y + App::I->off_y, c.z, c.w);
}
// draw the grid behind the layers using a temporary copy