Start to fix resolution change by properly freeing data.

This commit is contained in:
hiker 2015-06-10 10:33:47 +10:00
parent 0162407ff3
commit 860135376d

View File

@ -798,7 +798,7 @@ void IrrDriver::applyResolutionSettings()
// FIXME: this load sequence is (mostly) duplicated from main.cpp!! // FIXME: this load sequence is (mostly) duplicated from main.cpp!!
// That's just error prone // That's just error prone
// (we're sure to update main.cpp at some point and forget this one...) // (we're sure to update main.cpp at some point and forget this one...)
Shaders::destroy(); ShaderBase::updateShaders();
VAOManager::getInstance()->kill(); VAOManager::getInstance()->kill();
SolidPassCmd::getInstance()->kill(); SolidPassCmd::getInstance()->kill();
ShadowPassCmd::getInstance()->kill(); ShadowPassCmd::getInstance()->kill();
@ -806,6 +806,7 @@ void IrrDriver::applyResolutionSettings()
GlowPassCmd::getInstance()->kill(); GlowPassCmd::getInstance()->kill();
resetTextureTable(); resetTextureTable();
// initDevice will drop the current device. // initDevice will drop the current device.
Shaders::destroy();
initDevice(); initDevice();
// Re-init GUI engine // Re-init GUI engine