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 ....?

Thanks,

Mark

Mark A. Bolstad
Scientific Computing
Janelia Farm Research Campus
Howard Hughes Medical Institute
19700 Helix Drive, Ashburn, VA  20147
email: [email protected]
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

Reply via email to