Hi,
On 13/07/11 17:04, Bolstad, Mark wrote:
For an application that we are developing, I need to be able to render
three different objects into the three color channels separately, then
render to the display. I'm currently using a setup similar to
osgdistortion. The question is how to render into a single channel. My
setup looks like:
osg::Texture2D* texture = new osg::Texture2D;
texture->setTextureSize(tex_width, tex_height);
texture->setInternalFormat(GL_RGBA);
texture->setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR);
texture->setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR);
If I set the Internal format to GL_RED, GL_GREEN, ... in successive
renders, would the color data be packed? Or, do I need to use a subcopy,
or ....?
you will need to combine them manually, GL_RED is like GL_LUMINANCE so
you'll get only one output value per pixel packed. I think easiest would
be to render to 3 luminance textures and then combine in another step
into rgb.
rgds
jp
Thanks,
Mark
*/Mark A. Bolstad/*
Scientific Computing
Janelia Farm Research Campus
Howard Hughes Medical Institute
19700 Helix Drive, Ashburn, VA 20147
email:*[email protected] <mailto:[email protected]>**g*
office: +1.571.209.4623
web: http://www.hhmi.org/janelia/
_______________________________________________
osg-users mailing list
[email protected]
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.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org