[osg-users] osg::Texture and stateSets
Alberto Luaces
aluaces at udc.es
Thu Jul 10 08:51:44 PDT 2008
Hi,
El Jueves 10 Julio 2008ES 14:48:48 ka Ming escribió:
> Hi,
> I am already looked at the optimizer.
> But still I cannot access my Texture ;(.
> stateset.getTextureAttributeList() is always null. Why?
> I can call the geode Name. I can call the Geometry - but no Texture!!!
>
I'm having a similar problem. First I developed my own visitor, but then I
used osgUtil::Optimizer::TextureVisitor, but the method apply(osg::Texture
&texture) is never called. Short code below:
class ImageVisitor2: public osgUtil::Optimizer::TextureVisitor
{
public:
std::set<osg::Image*> images;
ImageVisitor2(): osgUtil::Optimizer::TextureVisitor(true, true, true,
true, true, 0.0)
{}
void apply(osg::Texture &texture)
{
images.insert(texture.getImage(0));
}
void escribirImagenes()
{
for_each(images.begin(), images.end(), imagenToDisk);
}
};
More information about the osg-users
mailing list