Hello all,
I try to rexplain my problem(cf
http://forum.openscenegraph.org/viewtopic.php?t=5016)
I 'm trying to use the RTT to build an algorithm of fast iterative method
it's a 2 render step:
1)build the 2ndpass input texture combining datas from several inputs textures
to one with a fragment shader.
1)loop a shader on the input texture (ping pong textures) untill a no more
pixel are drawn(occlusion query).
For this I made a FMMquerygeometry that performs the occlusion query and the
loop throught Geometry::drawimplementation:
FMMquerygeometry : public geometry{
Code:
drawimplementation(){
while(nottheend){
beginocclusionquery
Geometry::drawimplementation()
endquery()
}
}
And I build 2 prerender cameras performing the 2 render pass via FBO.
For debug purpose I use a compositeviewer one view displays:
Scene---prerenderCamera1stpass
|---prerenderCamera2ndpass
|-Main object using the output texture
the other view displays the debug result of the rtt 2nd pass (using a textured
quad and ortho projection)
My problem is that the texture displayed in the debug view are always the same
as if nothing have been done ( the original allocated osg::Image attached to
2ndpass outputtexture)
Thank by advance
To force this update I 've attached to OutputTexture->getImage() to the
colorbuffer of my 2ndpass camera....
But the problem is now that:
1)It make a GPU->CPU copy for nothing
2)When I change Inputs Textures along the time (by changing attached image and
call dirty) the debug view results doesn't change ....but If I try attaching
the 1st prerender camera to the outputtexture's image the debug view show me
evolutions of the 1st pass over the time...
Then how can i have the debug view working when it is based on an other scene
prerendering?
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=24527#24527
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org