DiscussionsIssue archiveOCCT:Visualization

Archived issue #0030570

Visualization, TKOpenGl - OpenGl_AspectFace ignores texture revision on recompute

Open CASCADEOCCT:Visualizationclosed5 public notes

Search issues

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());
      }
    }

Public activity

5 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Wed Mar 13 21:46:24 2019 +0300

    0030570: Visualization, TKOpenGl - OpenGl_AspectFace ignores texture revision on recompute
    
    Added revision check to one more branch within OpenGl_AspectsTextureSet::build().
02Author
Patch is ready for review.
03Commenter 3
The patch is reviewed without remarks.
04Commenter 1
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 16545.43 / 16599.24999999996 [-0.32%]
Products
Total CPU difference: 9089.230000000054 / 9092.71000000004 [-0.04%]
Windows-64-VC14:
OCCT
Total CPU difference: 18063.875 / 17985.28125 [+0.44%]
Products
Total CPU difference: 10479.09375 / 10460.953125 [+0.17%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
05Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]