Re: Applying and Enable Lighting

New Message Reply Date view Thread view Subject view Author view

Ran Yakir (rany++at++amit.rtset.co.il)
Tue, 27 Aug 1996 07:58:09 +0000


>
> This question is in regard to applying and enabling lighting on a deskside
> Onyx. We create a new light model using pfNewLmodel passing in NULL. Then,
we
> use pfApplyLModel and our code crashes. Any type of pfEnable or pfApply for
> lighting crashes the code. The same code works on a Crimson but not the
Onyx.
> Any comments or suggestions would be appreciated. Thanks.

The answer is within the question. When you pass NULL to the pfNewLModel
function, you allocate the lightmodel from the heap. This means that the data
referenced by it is accessible from the allocating process only. When you work
on a Crimson (single CPU), you get defaulted to a single process, so the
pfApplyLModel function can reference the light model data. On an ONYX (with
more than one CPU) you get defaulted to multiprocessed mode. So while the
NewLModel is called from the APP process, the ApplyLModel is called from the
DRAW process, and WHAAM.
There is a simple workaround for the problem :-) You should allocate the
lightmodel from the shared arena. This is done by
lm = pfNewLModel (pfGetSharedArena());

Ran

-- 
 __                                  | Ran Yakir
 /_)  _  __   \  / _   / o __        | RT-SET Ltd.
/ )_ (_(_) )   \/ (_(_/<_(_)(        | 
              _/                     |   
-------------------------------------+--------------------------------
Phone :                              | E-mail : rany++at++rtset.co.il
  Work : 972-9-552236                |          rany++at++netvision.net.il
  Res. : 972-9-989974                |
Fax    : 972-9-552239                |
=======================================================================
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:53:25 PDT

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