mirror of
https://github.com/moparisthebest/minetest
synced 2024-12-23 08:08:47 -05:00
fix memory leak on shader shutdown
This commit is contained in:
parent
7a32698312
commit
2bdff11d54
@ -388,6 +388,12 @@ ShaderSource::ShaderSource(IrrlichtDevice *device):
|
|||||||
ShaderSource::~ShaderSource()
|
ShaderSource::~ShaderSource()
|
||||||
{
|
{
|
||||||
//m_shader_callback->drop();
|
//m_shader_callback->drop();
|
||||||
|
|
||||||
|
for (std::vector<IShaderConstantSetter*>::iterator iter = m_global_setters.begin();
|
||||||
|
iter != m_global_setters.end(); iter++) {
|
||||||
|
delete *iter;
|
||||||
|
}
|
||||||
|
m_global_setters.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 ShaderSource::getShaderId(const std::string &name)
|
u32 ShaderSource::getShaderId(const std::string &name)
|
||||||
|
@ -49,6 +49,7 @@ struct ShaderInfo
|
|||||||
video::E_MATERIAL_TYPE material;
|
video::E_MATERIAL_TYPE material;
|
||||||
|
|
||||||
ShaderInfo(): name(""), material(video::EMT_SOLID) {}
|
ShaderInfo(): name(""), material(video::EMT_SOLID) {}
|
||||||
|
virtual ~ShaderInfo() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user