Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

Transparent textures

Transparent textures
stigk 2012/07/13 15:53
Hi,

I am trying to show an object with both a texture and a transparency. However, the transparency setting is ignored. How can I set transparency in this case?

Sample code:

TopoDS_Face anObj=...
Handle(AIS_TexturedShape) AISObj = new AIS_TexturedShape(anObj);

AISObj->SetTextureFileName(texture);
AISObj->SetTextureMapOn();
AISObj->DisableTextureModulate();

AISObj->SetMaterial((Graphic3d_NameOfMaterial) material);
AISObj->SetDisplayMode(3);
Context->SetTransparency(AISObj,.3);
Context->Display(AISObj);


It works fine with a non-textured object, i.e. if I remove the first three AISObj-> lines. Can anybody guide me in the right direction?

Thanks,

Stigk
 
 
Latest news
  • Open CASCADE Technology 6.8.0 is available for download!
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map