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/src/osgWrappers/osg/Image.cpp

    r10876 r10924  
    1717#include <osg/NodeVisitor> 
    1818#include <osg/Object> 
     19#include <osg/StateAttribute> 
    1920#include <osg/Vec2> 
    2021#include <osg/Vec3> 
     
    376377                  "Get the const PixelBufferObject. ", 
    377378                  ""); 
     379        I_Method0(bool, requiresUpdateCall, 
     380                  Properties::VIRTUAL, 
     381                  __bool__requiresUpdateCall, 
     382                  "return whether the update(NodeVisitor* nv) should be required on each frame to enable proper working of osg::Image. ", 
     383                  ""); 
    378384        I_Method1(void, update, IN, osg::NodeVisitor *, x, 
    379385                  Properties::VIRTUAL, 
    380386                  __void__update__NodeVisitor_P1, 
    381                   "", 
     387                  "update method for osg::Image subclasses that update themselves during the update traversal. ", 
    382388                  ""); 
    383389        I_Method3(bool, sendPointerEvent, IN, int, x, IN, int, x, IN, int, x, 
     
    499505END_REFLECTOR 
    500506 
     507BEGIN_OBJECT_REFLECTOR(osg::Image::UpdateCallback) 
     508        I_DeclaringFile("osg/Image"); 
     509        I_BaseType(osg::StateAttributeCallback); 
     510        I_Constructor0(____UpdateCallback, 
     511                       "", 
     512                       ""); 
     513END_REFLECTOR 
     514 
    501515STD_VECTOR_REFLECTOR(std::vector< unsigned int >) 
    502516