Hi Robert,

Robert Osfield wrote:
> Hi J.P,
> 
> On Fri, Apr 18, 2008 at 10:53 AM, J.P. Delport <[EMAIL PROTECTED]> wrote:
>>  version 8084 (that works) already has MRT included, that's why I had it
>>  on another machine.
>>
>>  It seems like it was the moving of the MRT to FBO that might be the problem.
> 
> Thanks for the clarification, gives us a little more to go on.
> Another possible clue:
> 
> osgprerender cow.osg --image --fbo
> 
> Produces the OpenGL error, while:
> 
> osgprerender cow.osg --image --window
> osgprerender cow.osg --image --fb
> osgprerender cow.osg --image --pbuffer
> 
> Don't produce and error, so its certainly the FBO code itself that is at 
> fault.

Yes, I think I know what is wrong.

Remember how you modified the enum Camera::BufferComponent so that 
COLOR_BUFFER and COLOR_BUFFER0 were not the same? When glDrawBuffers was 
in RenderStage, it knew to only enable MRT when COLOR_BUFFER0 or later 
was attached.

However, the fbo->setAttachment call is the same for COLOR_BUFFER and 
COLOR_BUFFER0. So now FBO internally incorrectly calls glDrawBuffers 
when COLOR_BUFFER (vs COLOR_BUFFER0) is attached and this causes the error.

I'm not sure how to fix this without changing fbo->setAttachment. Still 
looking...

jp

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

-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

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

Reply via email to