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);
      }
};


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to