RE: [info-performer] shadows using C

New Message Reply Date view Thread view Subject view Author view

From: Ong Tze Lin (tzelin++at++sgi.com)
Date: 10/10/2002 19:24:27


I haven't had a chance to try the code out, but just checking if you're
running this PFMP_APP_CULL_DRAW and perhaps issuing a gl command from APP
(since I see the call in main() ) instead of DRAW? If so, try running
PFMP_APPCULLDRAW (single process) and see if it works?

Cheers,
Tze Lin

> -----Original Message-----
> From: archerc++at++hitrontech.com [mailto:archerc++at++hitrontech.com]
> Sent: Tuesday, October 08, 2002 6:02 PM
> To: Performer List
> Subject: Re: [info-performer] shadows using C
>
>
> 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
>
> --------------------------------------------------------------
> ---------
> List Archives, Info, FAQ: 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
> --------------------------------------------------------------
> ---------
>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Oct 10 2002 - 19:19:44 PDT

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