I get an error when running the .exe outside of MSVC++ saying "Failed to share OpenGL context"....
When inside MSVC++ I don't get an error or issue. The window stops and only shows white.
So I am not sure what I am doing wrong but thought I seen an example all I had to do was just throw in a Sf::Context to make the multithread image loader work... Guess not.
SO what am I doing wrong here.
void NX::App::LoadResources(void)
{
static sf::Thread thread(&NX::ResourceManager::Load, NX::ResourceManager::Get());
thread.Launch();
}
void NX::ResourceManager::Load(void)
{
LoadSplashScreen();
LoadDefault();
LoadMaps();
}
void NX::ResourceManager::LoadSplashScreen(void)
{
//sf::Context context;
NX::FileSystem::Get()->GetDirComponents(NX::FileSystem::Get()->GetPath() + PATH_SPLASHSCREENS, splashScreenFiles);
for(unsigned int i = 0; i < splashScreenFiles.size(); ++i)
{
try
{
splashScreenFiles[i].erase(0, splashScreenFiles[i].find_last_of("//") + 1);
if(!Find(splashScreenFiles[i]))
{
NX::Resource* p = new NX::ResourceTexture(splashScreenFiles[i]);
p->Load(NX::FileSystem::Get()->GetPath() + PATH_SPLASHSCREENS);
Insert(p);
}
else
{
THROW_EXCEPTION(0, std::string("Already loaded: ") + splashScreenFiles[i]);
}
}
catch(NX::Exception& e)
{
NX::ErrorManager::Get()->Log(e);
}
}
glFlush();
splashScreensReady = true;
}