0030570: Visualization, TKOpenGl - OpenGl_AspectFace ignores texture revision on...
authorkgv <kgv@opencascade.com>
Wed, 13 Mar 2019 18:46:24 +0000 (21:46 +0300)
committerapn <apn@opencascade.com>
Fri, 15 Mar 2019 16:11:45 +0000 (19:11 +0300)
Added revision check to one more branch within OpenGl_AspectsTextureSet::build().

src/OpenGl/OpenGl_AspectsTextureSet.cxx

index 7c03faf..1d70585 100644 (file)
@@ -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());
       }
     }