Hi Art,
Art Tevs wrote:
Hi Miika, J.P.,
ok, after hours of thinking and studying of OSG's source code, I have to admit,
that this would not be an easy task to solve that issue.
The problem is that, even if I am able to restore any FBO attribute, FBOs used
by cameras will break the whole thing down :(
Imagine this simple scene graph:
mainCamera->FBO 1
|
+---slaveCamera->FBO 2 -- scene -- Node->FBO 3
|
scene
So whenever now slaveCamera is activated, the corresponding FBO will be bound. However, the problem is that this FBO is not handled like an Attribute, so that it can be pushed and popped, no it is a hard coded call to enable FBO. Now, whenever I have a node, which uses another FBO, this will cause the traverser to pop the FBO 3 after rendering of Node, and hence even pop the FBO out of the mainCamera.
So in order to get rid of circumstances to change OSG code, I decided to patch
osgPPU to handle FBOs manually. Hence, now whenever a Unit is rendered, it
first pushes current FBO on stack and then activates its own. After rendering
is done, it does activates the previous FBO back.
Now, Miika, your examples works like a charme. Yeah, I still remember that very
first version of osgPPU handled FBOs on its own. However I droped that
handling, because there were issues with multithreading. It seems that now,
there are no such issue sanymore.
So, take a look into current osgPPU svn trunk. Please test it and let me know,
if you experience other issues with it.
J.P. could you also test new osgPPU in your application. The changes are not trivial and hence may even introduce new bugs (I would expect them in handling of multiple rendering targets).
Thanks for the update Art, I will let you know if there are any issues.
jp
Cheers,
Art
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16096#16096
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org