Show
Ignore:
Timestamp:
01/07/10 13:14:47 (4 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/include/osg/ImageSequence

    r10671 r10924  
    1717#include <OpenThreads/Mutex> 
    1818#include <osg/ImageStream> 
    19 #include <osg/StateAttribute> 
    2019 
    2120#include <list> 
     
    102101        Images& getImages() { return _images; } 
    103102        const Images& getImages() const { return _images; } 
    104          
    105103 
     104        /** ImageSequence requires a call to update(NodeVisitor*) during the update traversal so return true.*/ 
     105        virtual bool requiresUpdateCall() const { return true; } 
     106 
     107        /** update method for osg::Image subclasses that update themselves during the update traversal.*/ 
    106108        virtual void update(NodeVisitor* nv); 
    107  
    108         struct OSG_EXPORT UpdateCallback : public osg::StateAttributeCallback 
    109         { 
    110             virtual void operator () (osg::StateAttribute* attr, osg::NodeVisitor* nv); 
    111         }; 
    112109 
    113110    protected: