Callstack:
(...)
appSnakeClient-vc11.exe!sf::GlResource::GlResource() Line 61 C++
appSnakeClient-vc11.exe!sf::Context::Context() Line 61 C++
appSnakeClient-vc11.exe!`anonymous namespace'::getInternalContext() Line 155 C++
appSnakeClient-vc11.exe!sf::priv::GlContext::ensureContext() Line 213 C++
appSnakeClient-vc11.exe!sf::GlResource::GlResource() Line 61 C++
appSnakeClient-vc11.exe!sf::Context::Context() Line 61 C++
appSnakeClient-vc11.exe!`anonymous namespace'::getInternalContext() Line 155 C++
appSnakeClient-vc11.exe!sf::priv::GlContext::ensureContext() Line 213 C++
appSnakeClient-vc11.exe!sf::GlResource::GlResource() Line 61 C++
appSnakeClient-vc11.exe!sf::Context::Context() Line 61 C++
appSnakeClient-vc11.exe!`anonymous namespace'::getInternalContext() Line 155 C++
appSnakeClient-vc11.exe!sf::priv::GlContext::ensureContext() Line 213 C++
appSnakeClient-vc11.exe!sf::GlResource::GlResource() Line 61 C++
appSnakeClient-vc11.exe!sf::Context::Context() Line 61 C++
appSnakeClient-vc11.exe!`anonymous namespace'::getInternalContext() Line 155 C++
appSnakeClient-vc11.exe!sf::priv::GlContext::ensureContext() Line 213 C++
appSnakeClient-vc11.exe!sf::GlResource::GlResource() Line 61 C++
appSnakeClient-vc11.exe!sf::Context::Context() Line 61 C++
appSnakeClient-vc11.exe!`anonymous namespace'::getInternalContext() Line 155 C++
appSnakeClient-vc11.exe!sf::priv::GlContext::ensureContext() Line 213 C++
appSnakeClient-vc11.exe!sf::GlResource::GlResource() Line 61 C++
appSnakeClient-vc11.exe!sf::Context::Context() Line 61 C++
appSnakeClient-vc11.exe!`anonymous namespace'::getInternalContext() Line 155 C++
appSnakeClient-vc11.exe!sf::priv::GlContext::ensureContext() Line 213 C++
appSnakeClient-vc11.exe!sf::GlResource::GlResource() Line 61 C++
Some parts of SFML code:
Context::Context() // <== GOES HERE! constructor is calling inherited constructor GlResource::GlResource
{
m_context = priv::GlContext::create();
setActive(true);
}
GlResource::GlResource()
{
{
// Protect from concurrent access
Lock lock(mutex);
// If this is the very first resource, trigger the global context initialization
if (count == 0)
priv::GlContext::globalInit();
// Increment the resources counter
count++;
}
// Now make sure that there is an active OpenGL context in the current thread
priv::GlContext::ensureContext(); // <== GOES HERE!
}
void GlContext::ensureContext()
{
// If there's no active context on the current thread, activate an internal one
if (!currentContext)
getInternalContext()->setActive(true); // <== GOES HERE!
}
namespace
{
sf::Context* getInternalContext()
{
if (!hasInternalContext())
{
internalContext = new sf::Context; // <== GOES HERE!
sf::Lock lock(internalContextsMutex);
internalContexts.insert(internalContext);
}
return internalContext;
}
}