Re: [info-performer] shadows using C

New Message Reply Date view Thread view Subject view Author view

From: Archer Chen (archerc++at++hitrontech.com)
Date: 10/08/2002 03:02:21


Hi performer,
I got the same problem about to show a shadow in C-API.
When the code run to "pfShadowApply()", it core dump .
The error message is:
==============================================
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 2086)]
0x403d24a0 in pfShadow::apply () at eval.c:41
41 eval.c: No such file or directory.
        in eval.c
==============================================

Please someone can give some suggestion to fix the problem.
Thanks a lot.
Here is some segment of my code.....

#define PFSHD_PARAM_TEXTURE_SIZE 1
#define PFSHD_PARAM_NUM_TEXTURES 2
#define PFSHD_BLEND_TEXTURES (1<<0)
(I can't include the file pfShadow.h because it caused
 compile error)

 main()
{
.....
        t = pfGetTime();
        shared->shadow.caster = pfdLoadFile("ch53.pfb");
        pfMakeRotMat(shared->shadow.casterMat, 180+15.0*t, 0,0,1);

        shared->shadow.shadow = pfNewShadow(pfGetSharedArena());
        pfShadowAddChannel(shared->shadow.shadow, chan);
        pfShadowNumCasters(shared->shadow.shadow, 1);
        pfShadowShadowCaster(shared->shadow.shadow, 0,
                                               shared->shadow.caster,
shared->shadow.casterMat);

        pfShadowNumSources(shared->shadow.shadow, 1);
        pfShadowSourcePos(shared->shadow.shadow, 0, -0.2, 0.2, -0.2, 0);
        pfShadowAmbientFactor(shared->shadow.shadow, 0, 0.6);
        pfShadowVal(shared->shadow.shadow, 0, 0, PFSHD_PARAM_TEXTURE_SIZE,
512);
        pfShadowVal(shared->shadow.shadow, 0, 0, PFSHD_PARAM_NUM_TEXTURES,
32);
        pfShadowFlags(shared->shadow.shadow, PFSHD_BLEND_TEXTURES, 1);
        pfShadowApply(shared->shadow.shadow); ---------------- >core dump

....

}

Thanks again.

Regards,
Archer Chen

_____________________________________
----------------------------------------------------------

From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 07/31/2002 10:23:45
Next message: Steve Fuhrman: "[info-performer] SoftImage XSI loader for
Performer?"
Previous message: Tom Flynn: "Re: [info-performer] dynamic_cast problem"
In reply to: brad schwagler: "[info-performer] shadows using C"

Hi Brad !

- The Performer C-API generator produced pfNewShadow wrong. I fixed it for
  the 3.0 release.

- The prototype of the call pfShadowAddChannel is
    pfShadowAddChannel(pfShadow* _shadow, pfChannel *channel);
  The man page is also correct. Where exactly did you find the example below
?

If you want, you can send me your C example. I can compile and run it
against
my C-API fix (just to verify that it really fixes your problem).

Thanks,
-yair


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Oct 08 2002 - 03:04:45 PDT

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