Force OpenGL states to be reset when RenderTarget detects that a new context has to be tracked. In the case a context is re-created, FBO RenderTextures would not trigger resetting of the OpenGL states if they were drawn to first since re-initialization of the RenderTarget only happens when a context owner such as a RenderWindow is re-created. Fixes #1625.

This commit is contained in:
binary1248 2019-12-09 00:57:15 +01:00 committed by Lukas Dürrenberger
parent a1d4bc80c2
commit bf98acc61f

View File

@ -405,6 +405,7 @@ bool RenderTarget::setActive(bool active)
{
contextRenderTargetMap[contextId] = m_id;
m_cache.glStatesSet = false;
m_cache.enable = false;
}
else if (iter->second != m_id)