| 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 |
 |
| | | |