From: bert's account (lberto++at++clubfed.sgi.com)
Date: 01/12/2001 11:07:31
if the material color mode is set to other then ' PFMTL_CMODE_OFF'
then Alpha is taken from the geometry color. if the geometry color
is opaque...... !
Boris Mansencal wrote:
>
> Hi pfAll,
>
> I have a problem with transparency.
> I load a file with several objects, and I would like
> to change only the alpha component for one of the
> pfGeoSets. (I know the color is defined in the pfGeoSet, but
> I
>
> I have the following code (with myGeoSet being a red box for example) :
> ...
> pfGeoState *gstate = myGeoSet->getGState()
> pfMaterial *matl = new pfMaterial();
> matl->setColorMode(PFMTL_FRONT, mode);
> matl->setAlpha(0.3);
> gstate->setAttr(PFSTATE_FRONTMTL, matl);
> gstate->setMode(PFSTATE_TRANSPARENCY, PFTR_ON);
> ...
>
> If mode==PFMTL_CMODE_OFF, my object is transparent, but white/grey
> (the color of the pfGeoSet has no effect, it's ok.)
>
> If mode==PFMTL_CMODE_AMBIENT_AND_DIFFUSE, my object is red but not
> transparent.
>
> Could somebody tell me what's wrong ?
>
> Is there a better way to do this ?
>
> Thanks a lot.
>
> Boris.
>
> --
> Boris Mansencal
> INRIA Rocquencourt (France) - projet i3D
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
-- See Ya,Lawrence Eugene Bertoldi Technical Consultant vnet 238-8949 Silicon Graphics phone 301-572-8949 Silver Spring MD. email lberto++at++clubfed.sgi.com
~;-}>
This archive was generated by hypermail 2b29 : Fri Jan 12 2001 - 11:07:39 PST