diff --git a/irr/include/ITexture.h b/irr/include/ITexture.h index 8c31dc7e9..b2ed300a5 100644 --- a/irr/include/ITexture.h +++ b/irr/include/ITexture.h @@ -186,11 +186,8 @@ class ITexture : public virtual IReferenceCounted You may want to call regenerateMipMapLevels() after this when you changed any data. */ virtual void unlock() = 0; - //! Regenerates the mip map levels of the texture. - /** Required after modifying the texture, usually after calling unlock(). - \param layer It informs a texture about which cubemap or texture array layer - needs mipmap regeneration. */ - virtual void regenerateMipMapLevels(u32 layer = 0) = 0; + //! Regenerates the mip map levels of the texture. */ + virtual void regenerateMipMapLevels() = 0; //! Get original size of the texture. /** The texture is usually scaled, if it was created with an unoptimal diff --git a/irr/src/CNullDriver.h b/irr/src/CNullDriver.h index b31c2c13f..311b5c125 100644 --- a/irr/src/CNullDriver.h +++ b/irr/src/CNullDriver.h @@ -605,7 +605,7 @@ class CNullDriver : public IVideoDriver, public IGPUProgrammingServices void *lock(E_TEXTURE_LOCK_MODE mode = ETLM_READ_WRITE, u32 mipmapLevel = 0, u32 layer = 0, E_TEXTURE_LOCK_FLAGS lockFlags = ETLF_FLIP_Y_UP_RTT) override { return 0; } void unlock() override {} - void regenerateMipMapLevels(u32 layer = 0) override {} + void regenerateMipMapLevels() override {} }; core::array Textures; diff --git a/irr/src/COpenGLCoreTexture.h b/irr/src/COpenGLCoreTexture.h index e25b457bc..04024ac19 100644 --- a/irr/src/COpenGLCoreTexture.h +++ b/irr/src/COpenGLCoreTexture.h @@ -115,8 +115,7 @@ class COpenGLCoreTexture : public ITexture } if (HasMipMaps) { - for (size_t i = 0; i < tmpImages->size(); ++i) - regenerateMipMapLevels(i); + regenerateMipMapLevels(); } if (!KeepImage) { @@ -389,7 +388,7 @@ class COpenGLCoreTexture : public ITexture LockLayer = 0; } - void regenerateMipMapLevels(u32 layer = 0) override + void regenerateMipMapLevels() override { if (!HasMipMaps || (Size.Width <= 1 && Size.Height <= 1)) return;