Hi Wojciech and thanks for the reply.

In my specific case, I'm rendering multisampled to a texture, which requires actually rendering to multisampled renderbuffers and then doing a resolve blit to the texture. This requires 2 FBOs. And I want one to have depth, but not the other.

Once I get back from break, I'll take a look at current svn and see if it satisfies this criteria. But from your post, it sounds like if I attach a depth buffer to this Camera, then it will implicitly create a depth attachment for the resolve FBO, which is what I'm trying to avoid.

All this is pretty easy to do in OpenGL, but the fact that OSG's Camera interface hides FBOs from the developer makes things more complex. I'd be in favor of an interface that exposes FBOs to the developer.

Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ <http://www.skew-matrix.com/>
+1 303 859 9466



Wojciech Lewandowski wrote:
Hi Paul,

Month (or two) ago we merged a patch to disable color/depth buffer enforcement in FBO setup in RenderStage. Idea was to put responsibilty for selected attachments on the programmer. If he/she did not add depth attachment it would be honored by RenderStage. We almost did it, but... If you look at our changes in 2.9.5 in trunk you will notice that there are two defines in RenderStage.cpp: FORCE_COLOR_ATTACHMENT and FORCE_DEPTH_ATTACHMENT. They are currently set to 1. Which means missing attachments are still added automatically. We wanted to ultimately set them to 0, but at that moment few of the examples (osgPrerender) were relying on adding default depth. Robert also noticed problems in osgShadow with ATI under Linux when color attachment was not added.

Final goal is to replace this defines with flags that could be changed at runtime. Its pretty straightforward but we did not do this last step. Mostly because we did not decided on interface to change them. Robert proposed that it would be good idea to select default attachment policy through DisplaySettings. I initially objected but in the end I agreed that this is probably the most reasonable approach. And disussion stopped then. Others remained silent. I guess Robert had and still has so much on his plate he could not tackle this yet. If its real emergency maybe you will be the one who will finish it.

Cheers,
Wojtek Lewandowski

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

Reply via email to