///////////////////////////////////////////////////////
| 109 | |
| 110 | //////////////////////////////////////////////////////////// |
| 111 | const Context* Context::getActiveContext() |
| 112 | { |
| 113 | using ContextImpl::currentContext; |
| 114 | |
| 115 | // We have to check that the last activated sf::Context is still active (a RenderTarget activation may have deactivated it) |
| 116 | if (currentContext && currentContext->m_context.get() == priv::GlContext::getActiveContext()) |
| 117 | return currentContext; |
| 118 | |
| 119 | return nullptr; |
| 120 | } |
| 121 | |
| 122 | |
| 123 | //////////////////////////////////////////////////////////// |