Angus Dorbie (dorbie++at++sgi.com)
Fri, 26 Nov 1999 02:41:18 -0800
You can update the geoset each frame.
If multiprocessing you may want to use a flux buffer to ensure it all
happens synchronously although with particles that's probably not a big
deal. Computing the bounding sphere for culling would impose additional
computational overhead and you might want to ensure that was done,
adding to the complexity of the implementation details.
The OpenGL approach was probably suggested because of the ease of
porting from your existing code and it's certainly a valid technique. It
will not use Performer culling or drawing because it will simply execute
your drawing code unless the code was a callback on a pfNode in the
scene graph instead of a call made in the channel draw callback as
posted.
It just so happens I have some Performer based particle system sample
code on my web page with descriptions. See the aqua section, URL in my
.signature. For particle systems I like the performer approach because
it guarantees that the efficient performer drawing routines will be
used, but you might have your own efficient draw code. In addition
Performer handles the perspective effect calculations even with 2D
points and on high end SGI hardware will use OpenGL extensions for
hardware accelerated 3D multisample point calculations. When
multiprocessing, all the inter process communication issues are resolved
if you just pfMalloc your data and assign the attributes to the geoset
in the application process. Otherwise you'd have to pass these pointers
to your draw code which is an implementation detail you have to worry
about. If you pfFlux this attribute data then the number of primitives
information will not be fluxed at the same rate so there are some
serious caveats to consider depending on the details of your particle
system but no more onerous than the IPC issues you'd have to deal with
anyway.
Cheers,Angus.
-- "Success is the ability to go from one failure to another with no loss of enthusiasm." - Winston Churchill.Performer + OpenGL examples and tutors: http://www.dorbie.com/
This archive was generated by hypermail 2.0b2 on Fri Nov 26 1999 - 02:41:41 PST