From: kgv Date: Wed, 13 Mar 2019 18:46:24 +0000 (+0300) Subject: 0030570: Visualization, TKOpenGl - OpenGl_AspectFace ignores texture revision on... X-Git-Tag: V7_4_0_beta~216 X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=31fe1f8ec4a6ed9b0850f3c2703277c285385879 0030570: Visualization, TKOpenGl - OpenGl_AspectFace ignores texture revision on recompute Added revision check to one more branch within OpenGl_AspectsTextureSet::build(). --- diff --git a/src/OpenGl/OpenGl_AspectsTextureSet.cxx b/src/OpenGl/OpenGl_AspectsTextureSet.cxx index 7c03faf827..1d705854bd 100644 --- a/src/OpenGl/OpenGl_AspectsTextureSet.cxx +++ b/src/OpenGl/OpenGl_AspectsTextureSet.cxx @@ -197,6 +197,14 @@ void OpenGl_AspectsTextureSet::build (const Handle(OpenGl_Context)& theCtx, } else { + if (aTexture->Revision() != aResource->Revision()) + { + if (Handle(Image_PixMap) anImage = aTexture->GetImage()) + { + aResource->Init (theCtx, *anImage.operator->(), aTexture->Type()); + aResource->SetRevision (aTexture->Revision()); + } + } aResource->Sampler()->SetParameters (aTexture->GetParams()); } }