Hi All,
I have just looked into the code associated with glDrawBuffers as this is
an extension in theory it should be straight forward, but... from the
FrameBufferObject.cpp usage I see that only the existance of GLE2Extensions
object being null is checked for:
// enable drawing buffers to render the result to fbo
if (_drawBuffers.size() > 0)
{
GL2Extensions *gl2e = GL2Extensions::Get(state.getContextID(), true
);
if (gl2e)
{
gl2e->glDrawBuffers(_drawBuffers.size(), &(_drawBuffers[0]));
}
}
Which to me suggests a problem with part no checking for the individual
extension. It also points to _drawBuffers not being empty on a platform
that doesn't support it which itself is an wider issue, suggesting the
usage of FBO is not appropriate.
// enable drawing buffers to render the result to fbo
if (_drawBuffers.size() > 0)
{
GL2Extensions *gl2e = GL2Extensions::Get(state.getContextID(), true
);
if (gl2e && gl2e->isDrawBuffersSupported())
{
gl2e->glDrawBuffers(_drawBuffers.size(), &(_drawBuffers[0]));
}
else
{
OSG_WARN <<"Warning: FrameBufferObject: could not set draw
buffers, glDrawBuffers is not supported!" << std::endl;
}
}
I'm not yet clear on the after effects of glDrawBuffers not being support
when _drawBuffers is not empty.
Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org