Hi Mathias,

[..]. I noticed that when DEPTH_ATTACHMENT is not
forced, depth tests in Prerender fail and Cow.osg or Cessna.osg are
displayyed with "holes". So it would be necccesary to test all examples
using FBOs and check if they require exlpicit setting of depth
attachments. Once examples are fixed one may turn off
FORCE_DEPTH_ATTACHMENT in RenderStage.cpp.

This sounds exactly like the issue I'm currently experiencing. I've already tried to find some help in this topic: http://forum.openscenegraph.org/viewtopic.php?t=3322 I had to create/manage my own FBO since I need a handle to it for various reasons. Basically I'm trying to do RTT. This means my FBO has just a texture2d attached to it (as GL_COLOR_ATTACHMENT). Do you know what the reason for this behaviour is? Am I right that attaching a depth attachment to an FBO solves the issue? What is different in your implementation when FORCE_DEPTH_ATTACHMENT is set?
The screenshot you posted on the forum shows exactly the same result I had with osgPrerender when FBO had no depth buffer attached. So, yes, I would bet that attaching depth renderbuffer or texture should help in your trouble. No depth attachment has the same result as GL_DEPTH_TEST mode turned to off. So faces of the model are not z-sorted properly.

Hope this helps,
Wojtek Lewandowski
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to