Angus Dorbie (dorbie++at++sgi.com)
Thu, 25 Nov 1999 21:25:46 -0800
Cheers,Angus.
Geoff Levner wrote:
>
> Dimitris Christopoulos wrote:
>
> > The problem is that my particles are represented as points, each
> > particle has its own path
> > and is independent of the others. In Opengl I just compute the new
> > position of all the particles,
> > do a loop through all particles and draw them as lines from the previous
> > position to the current.
> > Now how do I store this kind of dynamic data in a Geoset. I could modify
> > at ech frame the
> > coordinate values of a geoset directly but I dont know how efficient
> > this would be for 4000 particles,
> > which are displayed at each frame.
>
> It sounds like what you probably want to do is to use a callback in the
> DRAW process to draw your particles (using your old OpenGL code) rather
> than creating a geoset. Try something like this:
>
> pfChannel *chan;
> chan->setTravFunc(PFTRAV_DRAW, drawfunc);
>
> This tells Performer to call your own function to draw the channel, rather
> than doing it itself. Then you supply a draw callback which looks
> something like this:
>
> void drawfunc(pfChannel *chan, void *userdata)
> {
> chan->clear();
> pfDraw();
> // OpenGL code to draw particles...
> }
>
> Look at the man page for pfChannel ("application-defined callbacks") for
> more info.
>
> Geoff
>
> --
> Geoff Levner -- g.levner++at++acsys.it
> ACS Studio, via Aurelia 58, 00165 Roma, Italy
> tel. +39-063936331, fax +39-0639363317
>
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
-- "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 Thu Nov 25 1999 - 21:26:10 PST