Hi everyone. I have some problems with text and transparency.
If I create a text in this manner:
/// create node for the name (face is a TextTXFFace)
face->layout(string("HELLO"), layoutParamTxf, layoutResult);
NodePtr text = face->makeNode(layoutResult, 15);
// Get the texture that contains the characters of the font
ImagePtr image = face->getTexture();
// Create the texture that will hold the image
SimpleTexturedMaterialPtr tex =
SimpleTexturedMaterial::create();
beginEditCP(tex);
tex->setImage(image);
tex->setLit(false);
tex->setDiffuse(mWData->mListOfGOM[i].nameColor);
//tex->setTransparency(0.8);
endEditCP(tex);
// Assign the texture to the geometry txf
geoTxf = GeometryPtr::dcast(text->getCore());
beginEditCP(geoTxf, Geometry::MaterialFieldMask);
geoTxf->setMaterial(tex);
endEditCP(geoTxf, Geometry::MaterialFieldMask);
The text is ok, but I would like to make it a little transparent, si I
added
tex->setTransparency(0.8);
The problem is that this line doesn't do anything (even if I also add
a blendChunk);
I tested that if I load a simple texture from hard disk (a normal .
jpg), the transparency works, but if I use the text texture it doesn't
became transparent. Anyone could help me?
Thanl you in advance!
Christian
_______________________________________________
Migliaia di prodotti nuovi e usati a partire da 1 euro!
http://rover.ebay.com/rover/1/724-7199-4110-179/4/?id=2
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users