Hi J-S,
> Looking at the code, it seems like the same thing happens with the depth
buffer, i.e. a depth attachment will be created if none is present. IMHO,
a depth buffer is not mandatory - you could want to do an RTT pass on a
single fullscreen quad, in which case you don't need depth and can disable
depth test. In that case, wouldn't it make sense to only attach a color
buffer? An added depth buffer will only add to the video memory
requirements.
In other words, can't we trust the user to have set up their FBO
attachments correctly? In these two cases, the code checks if there's a
given attachment (depth or color) and if not, unconditionally adds one
whether the user needs it or not. The code can't know exactly what the
user needs, but isn't it better to be conservative instead of creating
everything in case the user needs it but doesn't know it?
GL_EXT_framebuffer_object spec allows FBOs without color attachments.
http://www.opengl.org/registry/specs/EXT/framebuffer_object.txt see issue
(45) ). Its only an intutition but I suspect there were times that despite
the specs both attachments were required by the drivers and FBO would not
work without them.
Cheers,
Wojtek Lewandowski
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org