Ran Yakir (rany++at++rtset.co.il)
Sat, 21 Jun 1997 16:44:39 +0300
> Hi,
>
> I know this should be a fairly simple question but I just couldn't
> get it
> right.
>
> I need to chnage the global shading model between PFSM_FLAT and
> PFSM_GOURAUD.
> I have tried the follwoing two ways but both gave me 'segmentation
> fault'.
>
> first approach (got from the 'man' page of 'pfShadeModel'):
>
> pfShadeModel(PFSM_FLAT);
> pfOverride(PFSTATE_SHADEMODEL, PF_ON);
>
> second approach (got from the insight manual page of Performer):
>
> pfGeoState *gstate;
> gstate = pfNewGState(NULL);
> pfGStateMode(gstate, PFSTATE_SHADEMODEL, PFSM_FLAT);
> pfApplyGState(gstate);
>
> I am using the ported perfly from Performer 1.2 as a base program. I
> inserted
> the above codes between all the initialization done by perfly and the
> 'while' simulation loop. Does anyone know what's wrong with my code?
Those are calling GL commands, so they have to be issued from within the
DRAW process. Better to it before the pfDraw().
Ran
--
__ | Ran Yakir
/_) _ __ \ / _ / o __ | 28 Ben Gurion St.
/ )_ (_(_) ) \/ (_(_/<_(_)( | Hod Hasharon 54200
_/ | Israel
-------------------------------------+--------------------------------
At Home : | At Work :
| RT-SET
Voice : +972-9-7489974 | Voice : +972-9-9552236
Fax : +972-9-7422149 | Fax : +972-9-9552239
E-mail : rany++at++netvision.net.il | E-mail : rany++at++rtset.co.il
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:29 PDT