Re: pfGsetAttr

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++bitch.reading.sgi.com)
Tue, 6 Aug 1996 11:21:24 +0100


I think the original technique should work.

As Veraart pointed out you need to have multiple copies of the geometry and
maintain frame synchronisation.

If you are lucky enopugh to avoid a core dump then you shouldn't get
garbage once the pointers & numbers have been assigned. This suggests
that the geometry youre building is incorrect.

To avoid any synchronisation problems without buffering you could try
setting the draw mode PFGS_COMPILE_GL to PF_ON for the geoset and whenever
you make a modification call pfGSetDrawMode( gset, PFGS_COMPILE_GL, PF_ON);
again. So you use the GL to cache the geoset for drawing and use
pfGSetDrawMode as a write through operation from your host data.

This won't work for animating the object every frame but it should work for
occasional modifications. You may have to deffer the call to pfGSetDrawMode
for a couple of frames, it depends on whether the PFGS_COMPILE_GL token is
buffered or not in the performer library.

Rgds,
Angus.

On Aug 6, 11:28am, Veraart wrote:
> Subject: Re: pfGsetAttr
> >
> > Hi to Everyone there,
> >
> > I am working with pfGeoSets and I managed to change some of their
> > characteristics
> > (such as Coords, norms, even norms indexes and coords indexes), but it
seems
> > impossible to change in real-time the number of primitives between two=
> > frames.
> >
> > What I do is te following :
> >
> > - 1. I add some vertices
> > - 2. I assemble them into primitives with the index table
> > - 3. I compute the normals
> > - 4. then I set the number of Prims with gset->setNumPrims();
> >
> > On the next frame, the GeoSet look fairly wrong !! (sometimes with
> > Core).
> >
> >
> > If someone know if it is possible (and how!) to modify GeoSet in real-time,
> > I will be very happy to hear from him (some king of God ?)..
>
> You can control the number of primitives in realtime by using the
transparency
> of the primitives by using a separate color for each primitive.
> In the Geostate you must set the Alpharef to say 0.05 and the Alphafunc to
> GEQUAL. Then set the transparency to 0.0 for the primitives that you don't
> want to see.
> If you use multi process be sure to use pfCycleBuffers to keep frame
> synchronisation.
>
> Mario
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from Veraart

=======================================================================
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:19 PDT

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