Hi Wojtek,
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.
Thanks for the reference. Incidentally, they talk about what I was
mentioning about depth attachments too:
"It also should be stated that attempting to render without
the "appropriate" buffers attached needs to be defined. For
instance, presumably, for depth rendering with no depth
buffer attached, the depth test is disabled, as it is in
traditional GL."
So I infer from this that both cases are valid according to the spec:
color buffer without depth, and depth buffer without color.
The code in osgUtil/RenderStage.cpp (as it stands now) automatically
attaches a depth buffer if there is none, and a color buffer if there is
none. Perhaps this code should be removed. If this causes problems to
applications on some drivers/cards, I think it's up to the application
to implement the workaround of adding a dummy color or depth buffer in
those cases, instead of forcing all OSG applications to use that
workaround and the associated video memory usage increase, even when
it's not needed on the driver/card...
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org