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

Method getFunction

src/SFML/Window/GlContext.cpp:684–697  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

682
683////////////////////////////////////////////////////////////
684GlFunctionPointer GlContext::getFunction(const char* name)
685{
686 // Make sure we don't try to create the shared context here since
687 // setActive can be called during construction and lead to infinite recursion
688 auto* sharedContext = SharedContext::getWeakPtr().lock().get();
689
690 // We can't and don't need to lock when we are currently creating the shared context
691 std::unique_lock<std::recursive_mutex> lock;
692
693 if (sharedContext)
694 lock = std::unique_lock(sharedContext->mutex);
695
696 return ContextType::getFunction(name);
697}
698
699
700////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 2

getFunctionFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected