From: Stace Peterson (stacep++at++sgi.com)
Date: 07/07/2005 17:48:40
Hugues,
As you have noticed, pfGeoArrays don't support flat primitives. This is
a limitation of the way that the OpenGL interfaces used for pfGeoArrays
are setup, and is unlikely to change. I'll look into better documenting
this case, however. Somewhat ironically, this case is actually the
worst case for pfGeoArrays, since it demands extra specification of data
which repeats vertex or normal data, but is typically never entirely
equivalent (identical for all attributes), so it does not index or cache
well.
As for the pfBillboard bug, thanks for bringing it to our attention and
I will look into it for you.
Thanks for your comments.
Stace
Hugues De Keyzer wrote:
>
> Hi all,
>
> while working with pfGeoArrays in OpenGL Performer 3.2, I noticed the following issues:
>
> Problems with flat primitives:
>
> The "flatness" of flat primitives (PFGS_FLAT_*) seems to be ignored with pfGeoArrays. They are drawn smooth-shaded instead of flat shaded, just like their non-flat counterparts. This results in incorrect shading since the normals are supposed to be used per face instead of per vertex.
>
> When setting the PFSTATE_SHADEMODEL to PFSM_FLAT in the corresponding pfGeoState results in correct rendering but all pfGeoSets using this state are of course drawn flat.
>
> Furthermore, the conversion function pfdConvertGeoSetToGeoArray() uses the functions defined in pfdOptimizeGraph.C, which discard the "flat" property of the primitives.
>
> Are we supposed to use only smooth primitives and separate faces to perform "flat shading", with the corresponding performance penalty :)?
>
> Problems with pfBillboards:
>
> Using a pfGeoArray with less than 3 primitives or less than 4 triangles (or similar) in a pfBillboard makes the draw traversal crash with the following backtrace:
>
> #0 0x4056c51e in pfVec3::xformPt(pfVec3 const&, pfMatrix const&) () from /usr/lib/libpf.so.5
> #1 0x40582538 in pfSprite::pr_transform(pfGeoSet*) () from /usr/lib/libpf.so.5
> #2 0x405ee4e9 in genDrawGSet(pfGeoSet*, char*, char*, char*, char*) () from /usr/lib/libpf.so.5
> #3 0x40540a47 in pfGeoSet::pr_drawBB(pfGeoState*, pfDispList*, pfStatsValGeom*) () from /usr/lib/libpf.so.5
> #4 0x40336f0a in pfBillboard::pf_draw(pfGeoState*, pfDispList*, pfStatsValGeom*, int, _pfCuller*, pfVec3*) () from /usr/lib/libpf.so.5
> #5 0x4046196b in _pfCuller::nb_drawBin(int) () from /usr/lib/libpf.so.5
> #6 0x40461c69 in _pfCuller::nb_draw(int) () from /usr/lib/libpf.so.5
> #7 0x404a1638 in beginDraw(int) () from /usr/lib/libpf.so.5
> #8 0x4049b809 in pfDraw () from /usr/lib/libpf.so.5
> #9 0x082362a5 in DrawFunc (chan=0x44766dc8, data=0x4484c320) at ../main.C:1080
> #10 0x403484e9 in pfChannel::pf_callDrawFunc() () from /usr/lib/libpf.so.5
> #11 0x4049b6d5 in doDraw(pfChannel*, pfPipe*, int*) () from /usr/lib/libpf.so.5
> #12 0x404a03b1 in appCullDraw(int) () from /usr/lib/libpf.so.5
> #13 0x404995fd in pfFrame () from /usr/lib/libpf.so.5
> #14 0x08235b08 in main (argc=0, argv=0xbffff484) at ../main.C:958
> #15 0x43152d06 in __libc_start_main () from /lib/libc.so.6
>
> Regards,
>
> Hugues De Keyzer
> de pinxi
>
> -----------------------------------------------------------------------
> 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
> -----------------------------------------------------------------------
-- ------------------------------------------------------------------ Stace Peterson stacep++at++sgi.com Silicon Graphics, Inc. (650) 933-2323
This archive was generated by hypermail 2b29 : Thu Jul 07 2005 - 17:48:42 PDT