Unload texture transformation state cache.
This commit is contained in:
parent
d6d7c6179c
commit
849467d281
@ -304,6 +304,11 @@ GLuint getDepthTexture(irr::video::ITexture *tex)
|
||||
|
||||
std::set<irr::video::ITexture *> AlreadyTransformedTexture;
|
||||
|
||||
void resetTextureTable()
|
||||
{
|
||||
AlreadyTransformedTexture.clear();
|
||||
}
|
||||
|
||||
void compressTexture(irr::video::ITexture *tex, bool srgb)
|
||||
{
|
||||
if (AlreadyTransformedTexture.find(tex) != AlreadyTransformedTexture.end())
|
||||
|
@ -159,6 +159,7 @@ GLint LoadProgram(Types ... args)
|
||||
|
||||
GLuint getTextureGLuint(irr::video::ITexture *tex);
|
||||
GLuint getDepthTexture(irr::video::ITexture *tex);
|
||||
void resetTextureTable();
|
||||
void compressTexture(irr::video::ITexture *tex, bool srgb);
|
||||
void blitFBO(GLuint Src, GLuint Dst, size_t width, size_t height);
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "config/user_config.hpp"
|
||||
#include "graphics/camera.hpp"
|
||||
#include "graphics/CBatchingMesh.hpp"
|
||||
#include "graphics/glwrap.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/lod_node.hpp"
|
||||
#include "graphics/material_manager.hpp"
|
||||
@ -206,6 +207,8 @@ void Track::cleanup()
|
||||
ItemManager::destroy();
|
||||
|
||||
ParticleKindManager::get()->cleanUpTrackSpecificGfx();
|
||||
// Clear remainder of transformed textures
|
||||
resetTextureTable();
|
||||
|
||||
for(unsigned int i=0; i<m_animated_textures.size(); i++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user