Thanks, Robert

I tested the changes on Windows and NVidia GF 8800. osghadow -4 --lispsm looked correct on my system. But I understand other systems may be different.

I am curious if setting ShadowCamera->attach( COLOR_BUFFER, GL_RGB ) would have the same effect as forcing COLOR_ATTACHMENT on ATI. I suppose it should. From the former discussion with J-S I come up with opinion that the best would be to not define OSG color/depth attachment policy but put the decision on application developers. If their application is run with troublesome drivers, programmers would explicitly attach missing buffer to be sure everything works on target platform. I think that adding a line: camera->attach( COLOR_BUFFER, GL_RGB ); is as easy as changing DisplaySettings flags for FBO buffer attachment policy.

On the other hand, it will also work for me if OSG majority decides to introduce such FBO attachments policy and will use DisplaySettings for this task. I have not used .cfg files and DisplaySettings extensively yet (at least not under various OSes) so I will leave question about DisplaySetting script format for more opinionated users ;-)

Cheers,
Wojtek

----- Original Message ----- From: "Robert Osfield" <robert.osfi...@gmail.com>
To: "OpenSceneGraph Users" <osg-users@lists.openscenegraph.org>
Sent: Friday, August 21, 2009 11:39 AM
Subject: Re: [osg-users] FBOs without color or depth attachments/DrawBuffer/ ReadBuffer


Hi Wojtek et. al,

I have just checked in the changes but to avoid regression on some
users systems I've temporarily reverted the disabling of the forcing
on of colour and depth buffer. But setting:

#define FORCE_COLOR_ATTACHMENT  1
#define FORCE_DEPTH_ATTACHMENT  1

At the top of src/osgUtil/RenderStage.  I say temporarily as I believe
we'll need to come up with a runtime override scheme that allows users
to set the defaults for the above at runtime, perhaps via the the
standard osg::DisplaySettings class that is used right now for various
global settings, with env vars available to customize the defaults.

It could be that we need to come up with a simple file format for
specifying these types defaults for various hardware/OS targets, and
make it possible to load this file at runtime to configure things.
This is a more general issue than just FBOs, but this FBO issue is
probably a good catlyst for getting some kind of solution.

Thoughts? Suggestions?
Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to