diff --git a/Source/Render/Textures/BitmapTextureCache.cpp b/Source/Render/Textures/BitmapTextureCache.cpp index 7a858fa68..984cb1134 100644 --- a/Source/Render/Textures/BitmapTextureCache.cpp +++ b/Source/Render/Textures/BitmapTextureCache.cpp @@ -2,6 +2,7 @@ #include "Render/Textures/BitmapTextureCache.h" #include "Render/RenderSystemBase.h" #include "Render/Textures/Texture.h" +#include "Render/Textures/TextureCache.h" #include @@ -23,7 +24,7 @@ void BitmapTextureCache::Update(BitmapPixels& bitmap, CRenderSystemBase& system) if (this->m_alpha) { if (this->m_textures.empty()) { - CTexture* texture = system.CreateTexture(bitmap.width, bitmap.height, TextureFormat::A8R8G8B8, false, false); + CTexture* texture = CreateTexture(bitmap.width, bitmap.height, TextureFormat::A8R8G8B8, false, false); if (texture) { this->m_textures.push_back(texture); } @@ -37,7 +38,7 @@ void BitmapTextureCache::Update(BitmapPixels& bitmap, CRenderSystemBase& system) for (unsigned y = 0; y < bitmap.height; y += 256) { for (unsigned x = 0; x < bitmap.width; x += 256) { this->m_textures.push_back( - system.CreateTexture(std::min(256u, bitmap.width - x), std::min(256u, bitmap.height - y), TextureFormat::A1R5G5B5, false, false) + CreateTexture(std::min(256u, bitmap.width - x), std::min(256u, bitmap.height - y), TextureFormat::A1R5G5B5, false, false) ); } }