mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-04 20:46:29 +03:00
Updated stb_image, thanks to sean for the fix!
This commit is contained in:
@@ -147,15 +147,8 @@ void cTextureFactory::ReloadAllTextures() {
|
||||
for ( Uint32 i = 1; i < mTextures.size(); i++ ) {
|
||||
cTexture* Tex = GetTexture(i);
|
||||
|
||||
if ( Tex ) {
|
||||
if ( Tex->LocalCopy() )
|
||||
Tex->Reload();
|
||||
else {
|
||||
Tex->Lock();
|
||||
Tex->Reload();
|
||||
Tex->Unlock(false, false);
|
||||
}
|
||||
}
|
||||
if ( Tex )
|
||||
Tex->Reload();
|
||||
}
|
||||
cLog::instance()->Write("Textures Reloaded.");
|
||||
} catch (...) {
|
||||
@@ -285,4 +278,21 @@ eeUint cTextureFactory::GetTexMemSize( const eeUint& TexId ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
cTexture * cTextureFactory::GetByName( const std::string& Name ) {
|
||||
return GetByHash( MakeHash( Name ) );
|
||||
}
|
||||
|
||||
cTexture * cTextureFactory::GetByHash( const Uint32& Hash ) {
|
||||
cTexture * tTex = NULL;
|
||||
|
||||
for ( Uint32 i = mTextures.size() - 1; i > 0; i-- ) {
|
||||
tTex = mTextures[ i ];
|
||||
|
||||
if ( NULL != tTex && tTex->Id() == Hash )
|
||||
return mTextures[ i ];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user