fix rendering issue when layer blending mode is used
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user