mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Fixed case where texture is loaded for both additive and non-additive
This commit is contained in:
parent
96c0a44a7e
commit
d1aa3de25e
1 changed files with 6 additions and 2 deletions
|
@ -2106,8 +2106,12 @@ Texture* DXRenderDevice::LoadTexture(const StringImpl& fileName, int flags)
|
|||
return aTexture;
|
||||
}
|
||||
|
||||
String pathEx = fileName;
|
||||
if ((flags & TextureFlag_Additive) != 0)
|
||||
pathEx += ":add";
|
||||
|
||||
DXTexture* aTexture = NULL;
|
||||
if (mTextureMap.TryGetValue(fileName, &aTexture))
|
||||
if (mTextureMap.TryGetValue(pathEx, &aTexture))
|
||||
{
|
||||
aTexture->AddRef();
|
||||
return aTexture;
|
||||
|
@ -2251,7 +2255,7 @@ Texture* DXRenderDevice::LoadTexture(const StringImpl& fileName, int flags)
|
|||
aTexture = (DXTexture*)RenderDevice::LoadTexture(fileName, flags);
|
||||
if (aTexture != NULL)
|
||||
{
|
||||
aTexture->mPath = fileName;
|
||||
aTexture->mPath = pathEx;
|
||||
mTextureMap[aTexture->mPath] = aTexture;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue