Worked around render target bug on macOS

This commit is contained in:
binary1248 2017-11-08 15:30:28 +01:00 committed by Lukas Dürrenberger
parent ce7ced5488
commit fe39af4ec8

View File

@ -373,6 +373,12 @@ void RenderTarget::resetGLStates()
// Check here to make sure a context change does not happen after activate(true)
bool shaderAvailable = Shader::isAvailable();
// Workaround for states not being properly reset on
// macOS unless a context switch really takes place
#if defined(SFML_SYSTEM_MACOS)
setActive(false);
#endif
if (setActive(true))
{
// Make sure that extensions are initialized