MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #30570 All Revisions ] Back to Issue ]
Summary 0030570: Visualization, TKOpenGl - OpenGl_AspectFace ignores texture revision on recompute
Revision 2019-03-13 20:41 by kgv
Description When both conditions happen at once - increasing texture revision and recomputing presentation - OpenGl_AspectFace ignores new texture revision and does not update texture.

void OpenGl_AspectFace::Resources::BuildTextures (const Handle(OpenGl_Context)& theCtx,
                                                  const Handle(Graphic3d_TextureSet)& theTextures)

...
    if (!aTexture.IsNull())
    {
      const TCollection_AsciiString& aTextureKeyNew = aTexture->GetId();
      if (aTextureKeyNew.IsEmpty()
      || !theCtx->GetResource<Handle(OpenGl_Texture)> (aTextureKeyNew, aResource))
      {
        aResource = new OpenGl_Texture (aTextureKeyNew, aTexture->GetParams());
        if (Handle(Image_PixMap) anImage = aTexture->GetImage())
        {
          aResource->Init (theCtx, *anImage.operator->(), aTexture->Type());
          aResource->SetRevision (aTexture->Revision());
        }
        if (!aTextureKeyNew.IsEmpty())
        {
          theCtx->ShareResource (aTextureKeyNew, aResource);
        }
      }
      else
      {
/// !!! texture revision is ignored here !!!
        aResource->Sampler()->SetParameters (aTexture->GetParams());
      }
    }
Revision 2019-03-13 20:39 by kgv
Description When both conditions happen at once - increasing texture revision and recomputing presentation - OpenGl_AspectFace ignores new texture revision and does not update texture.


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker