From: Mikko Rasa Date: Sat, 10 Dec 2016 23:01:31 +0000 (+0200) Subject: Also re-apply standard shader data when the shader program changes X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=63317e423282c1d8a7965743b20a9059a8086e67;p=libs%2Fgl.git Also re-apply standard shader data when the shader program changes --- diff --git a/source/renderer.cpp b/source/renderer.cpp index c744ac5a..c3a6923f 100644 --- a/source/renderer.cpp +++ b/source/renderer.cpp @@ -330,13 +330,13 @@ void Renderer::apply_state() changed = (changed&~MODERN_MATRIX)|STANDARD_SHDATA; } - if(state->material && (changed&MATERIAL_SHDATA)) + if(state->material && ((changed&MATERIAL_SHDATA) || shprog_changed)) { state->material->get_shader_data().apply(); changed &= ~MATERIAL_SHDATA; } - if(changed&STANDARD_SHDATA) + if((changed&STANDARD_SHDATA) || shprog_changed) { standard_shdata.apply(); changed &= ~STANDARD_SHDATA;