Re: No alpha channel with Inventormodels

New Message Reply Date view Thread view Subject view Author view

Paul Rider (prider++at++airinc.com)
Thu, 15 May 1997 07:59:13 -0400


Hey Christoph,
        This is how I got around that problem:

        //I placed this code in pfiv.C (The Inventor loader)
        //right after the switch `switch (act->getTextureWrapS()'
        //I'd tell you the line number but I've messed with the file so
        //much it wouldn't be the same with yours.

cbd->stateStack[cbd->stateDepth].soTex->image.
  getValue(texSize, numComponents);

if ( numComponents >= 4 ){
  cbd->geode->setTravFuncs( PFTRAV_DRAW,
  pTestPre, pTestPost );
}

//then in the pTestPre

glEnable( GL_ALPHA_TEST );
glAlphaFunc( GL_GREATER, 0.0 );

and in pTestPost, disable the alpha test again (performance reasons).

        I hope this helps,
                        ciao,
                                Paul J. Rider.

Christoph Brandt wrote:
>
> Hi
>
> I have problems getting the alphachannel to work when loading Inventor
> models into perfly. The alpha gets displayed white. The same model in
> OBJ format loads allright.
>
> Thanks for a suggestion.
>
> Christoph
>
> --
>
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:14 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.