Hi,
I use two texture units in my application, At beginning I only use the second
texture unit and only set texcoordarray for the first texture unit, then I
blend the textures using <osg::TexEnv>,that is:
osg::TexEnv* texenv = new osg::TexEnv;
texenv->setMode(osg::TexEnv::ADD);
texenv->setColor(osg::Vec4(0.3f,0.3f,0.3f,0.3f));
getOrCreateStateSet()->setTextureAttribute(1,texenv);
It's strange that the scene has lots of debris that part surface of the scene
seems too be destroyed, and this phenomenon is appeared on some versions of NV
driver, also when I turn off the "Thread Optimization", every thing is OK.
I don't know whether there will be problem if the first teture unit has no
texture(I only set texcoordarray for it initially and all the texcoord is set
to (0,0),that is :
for (int size=0;size<( surface_ver->size());size++)
{
init_tex_coord->push_back( osg::Vec2( 0.f, 0.f ) );
})
when I use this TexEnv mathod, and is this has any relationship with the
parameter "Thread Optimization" of the NV card? What's the purpose of this
parameter?
Thanks very much!
zhangguilian
2008-03-10
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org