Skip to content

Commit

Permalink
Fixed a bug in TextureManager, failed to load textures if prefixes (f…
Browse files Browse the repository at this point in the history
…w_...) were used.
  • Loading branch information
kblaschke committed Feb 2, 2024
1 parent a1d300f commit 60e5607
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libprojectM/Renderer/TextureManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void TextureManager::PurgeTextures()
#endif
}

TextureSamplerDescriptor TextureManager::TryLoadingTexture(const std::string& name)
auto TextureManager::TryLoadingTexture(const std::string& name) -> TextureSamplerDescriptor
{
TextureSamplerDescriptor texDesc;
GLint wrapMode{0};
Expand All @@ -230,7 +230,7 @@ TextureSamplerDescriptor TextureManager::TryLoadingTexture(const std::string& na

for (const auto& file : m_scannedTextureFiles)
{
if (file.lowerCaseBaseName != lowerCaseFileName)
if (file.lowerCaseBaseName != unqualifiedName)
{
continue;
}
Expand All @@ -254,7 +254,7 @@ TextureSamplerDescriptor TextureManager::TryLoadingTexture(const std::string& na
return {m_placeholderTexture, m_samplers.at({wrapMode, filterMode}), name, unqualifiedName};
}

TextureSamplerDescriptor TextureManager::LoadTexture(const std::string& fileName, const std::string& name)
auto TextureManager::LoadTexture(const std::string& fileName, const std::string& name) -> TextureSamplerDescriptor
{
GLint wrapMode;
GLint filterMode;
Expand Down

0 comments on commit 60e5607

Please sign in to comment.