MCPcopy Create free account
hub / github.com/SFML/SFML / getActiveContext

Method getActiveContext

src/SFML/Window/Context.cpp:111–120  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

109
110////////////////////////////////////////////////////////////
111const 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////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected