From 860135376d0b943e836ffcd0857a3ff7c94b7afe Mon Sep 17 00:00:00 2001 From: hiker Date: Wed, 10 Jun 2015 10:33:47 +1000 Subject: [PATCH] Start to fix resolution change by properly freeing data. --- src/graphics/irr_driver.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 87c8060c0..537f097fc 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -798,7 +798,7 @@ void IrrDriver::applyResolutionSettings() // FIXME: this load sequence is (mostly) duplicated from main.cpp!! // That's just error prone // (we're sure to update main.cpp at some point and forget this one...) - Shaders::destroy(); + ShaderBase::updateShaders(); VAOManager::getInstance()->kill(); SolidPassCmd::getInstance()->kill(); ShadowPassCmd::getInstance()->kill(); @@ -806,6 +806,7 @@ void IrrDriver::applyResolutionSettings() GlowPassCmd::getInstance()->kill(); resetTextureTable(); // initDevice will drop the current device. + Shaders::destroy(); initDevice(); // Re-init GUI engine