mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 15:51:04 +08:00
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:
parent
a1d4bc80c2
commit
bf98acc61f
@ -405,6 +405,7 @@ bool RenderTarget::setActive(bool active)
|
|||||||
{
|
{
|
||||||
contextRenderTargetMap[contextId] = m_id;
|
contextRenderTargetMap[contextId] = m_id;
|
||||||
|
|
||||||
|
m_cache.glStatesSet = false;
|
||||||
m_cache.enable = false;
|
m_cache.enable = false;
|
||||||
}
|
}
|
||||||
else if (iter->second != m_id)
|
else if (iter->second != m_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user