Show
Ignore:
Timestamp:
01/07/10 13:14:47 (5 years ago)
Author:
robert
Message:

Refactored the way that osg::Image/ImageSequence manages the update callback that needs to be attached to Textures to make it possible to use the Image::update() mechansim in other subclasses from osg::Image.
To enable the automatic attachment of the required update callback to call osg::Image::update(..) subclasses from osg::Image will
need to implement the osg::Image::requestUpdateCall() and return true, and implement the osg::Image::update(NodeVisitor?*) method to recieve the update call during the update traversal.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osg/ImageSequence.cpp

    r9062 r10924  
    2323using namespace osg; 
    2424 
    25 void ImageSequence::UpdateCallback::operator () (osg::StateAttribute* attr, osg::NodeVisitor* nv) 
    26 { 
    27     osg::Texture* texture = attr ? attr->asTexture() : 0; 
    28      
    29     // osg::notify(osg::NOTICE)<<"ImageSequence::UpdateCallback::"<<texture<<std::endl; 
    30     if (texture) 
    31     { 
    32         for(unsigned int i=0; i<texture->getNumImages(); ++i) 
    33         { 
    34             texture->getImage(i)->update(nv); 
    35         } 
    36     } 
    37 } 
    38  
    3925ImageSequence::ImageSequence() 
    4026{