PC specific change (ie PSP not impacted) - OpenGL is not thread safe, only one thread is allowed to have the context at any given time. The JGE library was not written with multithreading in mind, so the LoadTexture call doesn't work when called on a worker thread. In order to get my threading changes to work, I had to split out the OpenGL calls to happen on a point where we're guaranteed to be back on the main thread.
Functionally, this has no impact to the current build - all I've done is effectively the texture loading to happen in JQuad's constructor instead of inside the LoadTexture() function. Side note - I probably broke the IOS build with this change. Sorry, but I can only build so many targets at a time - I'm simply not set up to build this platform. As it's not a shipping target, I have to consider it a 2nd class citizen...
This commit is contained in:
@@ -320,14 +320,6 @@ bool WCachedTexture::Attempt(string filename, int submode, int & error)
|
||||
return false;
|
||||
}
|
||||
|
||||
//Failure of a different sort.
|
||||
if (texture->mTexId == INVALID_MTEX)
|
||||
{
|
||||
SAFE_DELETE(texture);
|
||||
error = CACHE_ERROR_BAD;
|
||||
return false;
|
||||
}
|
||||
|
||||
error = CACHE_ERROR_NONE;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user