Hi,

I'm trying to implement a simulation using for example a "ping pong" 
implementation of render to texture (similar to the gameoflife example in osg). 
I'm using osgPPu for the rendering part of my simulation and I would like now 
to integrate the processing of the simulation on the GPU through osgPPU in some 
way.

For now, I have something like that:

processor
    |-> unitTexture (to initialize or change the input texture through the cpu)
          |-> processSimulationUnitInOut (will contain the shader for the 
processing of the simulation)
                  |-> blurUnitInOut
                         |-> computeNormalsUnitInOut
                               |-> outputUnitInOut to get the ouput texture

My idea was to add a UnitInOut as child of processSimulationUnitInOut. This new 
unit is initialized with an output texture (like outputUnitInOut) I thought 
then that I could deliver the new processed texture to unitTexture through a 
NodeCallBack by the call of unitTexture->setTexture( unit->getOutputTexture() 
). But it doesn't work, the same if I try to copy the image data from one 
texture to the other.

Do I do the right way or is it totaly wrong or impossible that way ? I could 
use the gameoflife example but I don't see how I could integrate it.

Thanks a lot in advance for all your advises,
Vincent

... 


Thank you!

Cheers,
Vincent

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32253#32253





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to