From: David Steele Date: Thu, 29 Mar 2018 17:19:37 +0000 (+0100) Subject: Fixing bug with changing a shader on a renderer X-Git-Tag: dali_1.3.19~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F89%2F174289%2F1;p=platform%2Fcore%2Fuifw%2Fdali-core.git Fixing bug with changing a shader on a renderer If the renderer's shader is updated, as is the case in the refraction demo, then the texture doesn't get shown. This is because the attributes location cache isn't updated on the renderer when the shader changes (The attributes location cache should really be in the Program, not in the Renderer). Modified scene-graph-renderer to ensure that the geometry is resent to the RenderRenderer - this sets a flag to re-load the attributes and cache them. Change-Id: I8edfab92f89213ddb19ca3bd469e2be756c647ad Signed-off-by: David Steele --- diff --git a/dali/internal/update/rendering/scene-graph-renderer.cpp b/dali/internal/update/rendering/scene-graph-renderer.cpp index 6c93f9c..0d0f7fb 100644 --- a/dali/internal/update/rendering/scene-graph-renderer.cpp +++ b/dali/internal/update/rendering/scene-graph-renderer.cpp @@ -373,6 +373,7 @@ void Renderer::SetShader( Shader* shader ) mShader = shader; mShader->AddConnectionObserver( *this ); mRegenerateUniformMap = REGENERATE_UNIFORM_MAP; + mResendFlag |= RESEND_GEOMETRY; if( mRenderDataProvider ) {