[info-performer] pfGeoArray issues

Date view Thread view Subject view Author view

From: Hugues De Keyzer (hugues++at++depinxi.be)
Date: 07/06/2005 06:49:58


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


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jul 06 2005 - 07:00:17 PDT