HI Wojtek,

I've just has a look at your changed RenderStage. The changed code is
below.  Is there a reason why the #if !FORCE_COLOR_ATTACHMENT which
disables the draw and read buffer is done after the FBO apply?  I
looks to me that one could simply have an #ifdef/#else.  I do also
wonder whether this is glDrawBuffer( GL_NONE ); etc. is even needed as
well - as wouldn't the Camera provide the appropriate settings via the
Read and DrawBuffer fields.

Thanks for any clarifaction you can provide,
Robert.


#define FORCE_COLOR_ATTACHMENT  0
#if FORCE_COLOR_ATTACHMENT
            if (!colorAttached)
            {
                fbo->setAttachment(osg::Camera::COLOR_BUFFER,
osg::FrameBufferAttachment(new osg::RenderBuffer(width, height,
GL_RGB)));
                if (fbo_multisample.valid())
                {
                    fbo_multisample->setAttachment(osg::Camera::COLOR_BUFFER,
                        osg::FrameBufferAttachment(new osg::RenderBuffer(width,
                        height, GL_RGB, samples, colorSamples)));
                }
            }
#endif

            fbo->apply(state);

#if !FORCE_COLOR_ATTACHMENT
            if (!colorAttached)
            {
                glDrawBuffer( GL_NONE );
                glReadBuffer( GL_NONE );
            }
#endif

On Wed, Jul 22, 2009 at 9:53 AM, Wojciech
Lewandowski<[email protected]> wrote:
> Hi J-S,
>
>> I think if it gives a verifiable gain (less video memory used for depth
>> component RTT) then you can submit it. As you know, submission does not mean
>> that you need to be confident that it does not break anything, it means that
>> you are sending it for review. Robert will check it out, if there are
>> problems he might see them or if he's not sure then he'll call for more
>> testing by others who use that functionality.
>
> I saw direct improvement on GF 7800. On newer boards its smaller unless the
> OSG application is GPU memory bound. Which happens quite often in our
> practice.
>
>> At least it would mean that some progress is being made in the right
>> direction :-)
>>
>> I hope you consider sending your changes,
>
> Code attached. Changes are quite simple. You may as well test them.
> Considering Robert tight schedules I doubt he will be eager to play with it.
>
> Cheers,
> Wojtek
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to