Hi,
This can usually done by setting the explicit drawbuffer and a
consecutive call to glClear with the appropriate color set.
In OSG-terms I'd use a separate camera pass with the appropriate buffers
bound. Another option, if you need to selectively write to a certain
color buffer only is to use the ColorMaski to select the buffers you
need to write to.
Last option is to add the extension to OSG.
Cheers
Sebastian
Hi,
Is it possible to clear just certain textures in a framebuffer with multi
target rendering?
i am searching for equivalent functionality for glClearBufferfv.
Any help would be greatly appreciated.
example shader code:
out vec4 fragcolor1; // first target
out vec4 fragcolor2; // second target
void main()
{
fragcolor1 = vec4(1.0,0.0,0.0,1.0);
fragcolor2.g = 1.0;
}
basically i want to initialize first target as osg::Vec4(0.0,0.0,0.0,0.0);
and i want to initialize my second target to osg::Vec4(1.0,0.0,0.0,0.0).
I tried calling setClearColor in osg::Camera, but this initializes both targets
to same value.
Thanks & Regards,
amudhan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71694#71694
_______________________________________________
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