Skip to content

Commit

Permalink
Force OpenGL states to be reset when RenderTarget detects that a new …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
binary1248 authored and eXpl0it3r committed Jan 2, 2020
1 parent a1d4bc8 commit bf98acc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/SFML/Graphics/RenderTarget.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit bf98acc

Please sign in to comment.