problem solved
[Image: http://www.imgshare.cz/images/multipyty.jpg ]
osg::StateSet *quadState = quadGeode->getOrCreateStateSet();
osg::TexEnv *texenv = new osg::TexEnv;
texenv->setMode(osg::TexEnv::DECAL);
quadState->setTextureAttributeAndModes(0,
sourceSceneTexture, osg::StateAttribute::ON | osg::StateAttribute::PROTECTED);
quadState->setTextureAttributeAndModes(1,
mirrormask1, osg::StateAttribute::ON | osg::StateAttribute::PROTECTED);
quadState->setTextureAttribute(0,texenv);
quadState->setTextureAttribute(1,texenv);
changes in code:
1) remove texgen block
2) add:
osg::Vec4Array* colors = new osg::Vec4Array;
colors->push_back(osg::Vec4(1.0, 1.0, 1.0,
1.0));
colors->push_back(osg::Vec4(1.0, 1.0, 1.0,
1.0));
colors->push_back(osg::Vec4(1.0, 1.0, 1.0,
1.0));
colors->push_back(osg::Vec4(1.0, 1.0, 1.0,
1.0));
screenQuad->setColorArray(colors);
thank you j.p.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37216#37216
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org