Fixed memory leak: skybox textures are now freed in VRAM when deleting Skybox
This commit is contained in:
parent
9ea3d4958a
commit
351be306e1
@ -328,6 +328,13 @@ Skybox::Skybox(const std::vector<video::ITexture *> &skybox_textures)
|
||||
}
|
||||
}
|
||||
|
||||
Skybox::~Skybox()
|
||||
{
|
||||
glDeleteTextures(1, &m_cube_map);
|
||||
glDeleteTextures(1, &m_specular_probe);
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void Skybox::render(const scene::ICameraSceneNode *camera) const
|
||||
{
|
||||
|
@ -43,7 +43,8 @@ private:
|
||||
|
||||
public:
|
||||
Skybox(const std::vector<irr::video::ITexture *> &skybox_textures);
|
||||
|
||||
~Skybox();
|
||||
|
||||
void render(const irr::scene::ICameraSceneNode *camera) const;
|
||||
|
||||
inline GLuint getSpecularProbe() const {return m_specular_probe; }
|
||||
|
Loading…
Reference in New Issue
Block a user