1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0029659: Samples - Image is not displayed in Viewer2d MFC sample

Fixed wrong Display Mode assigned to Sample2D_Image presentation.
This commit is contained in:
kgv
2018-04-08 12:54:21 +03:00
committed by bugmaster
parent 557916474b
commit 759e2a15ca
2 changed files with 11 additions and 17 deletions

View File

@@ -38,6 +38,8 @@ void Sample2D_Image::SetContext(const Handle(AIS_InteractiveContext)& theContext
MakeShape();
this->Set(TopoDS_Shape(myFace));
myDrawer->SetShadingAspect (new Prs3d_ShadingAspect());
myDrawer->ShadingAspect()->Aspect()->SetTextureMap (new Graphic3d_Texture2Dmanual (myFilename));
Handle(Graphic3d_Texture2Dmanual) aTexture = new Graphic3d_Texture2Dmanual (myFilename);
aTexture->DisableModulate();
myDrawer->ShadingAspect()->Aspect()->SetTextureMap (aTexture);
myDrawer->ShadingAspect()->Aspect()->SetTextureMapOn();
}