Changeset 340 for trunk


Ignore:
Timestamp:
01/27/10 14:32:38 (2 years ago)
Author:
rkuck
Message:

Internal texture format of avango.osg.Image now accessable

Location:
trunk/avango-osg
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/avango-osg/include/avango/osg/Image.h

    r283 r340  
    7878 
    7979      /** 
     80       * Internal (i.e. GPU) pixel format if used as a texture 
     81       */ 
     82      SFInt InternalTextureFormat; 
     83 
     84      /** 
    8085       * Get the wrapped ::osg::Image. 
    8186       */ 
     
    8893      virtual void getHeightCB(const SFUInt::GetValueEvent& event); 
    8994      virtual void setHeightCB(const SFUInt::SetValueEvent& event); 
     95      virtual void getInternalTextureFormatCB(const SFInt::GetValueEvent& event); 
     96      virtual void setInternalTextureFormatCB(const SFInt::SetValueEvent& event); 
    9097 
    9198    private: 
  • trunk/avango-osg/src/avango/osg/Image.cpp

    r283 r340  
    4242                         boost::bind(&Image::getHeightCB, this, _1), 
    4343                         boost::bind(&Image::setHeightCB, this, _1)); 
     44   AV_FC_ADD_ADAPTOR_FIELD(InternalTextureFormat, 
     45                         boost::bind(&Image::getInternalTextureFormatCB, this, _1), 
     46                         boost::bind(&Image::setInternalTextureFormatCB, this, _1)); 
    4447} 
    4548 
     
    9093  // NOOP 
    9194} 
     95 
     96/* virtual */ void 
     97av::osg::Image::getInternalTextureFormatCB(const SFInt::GetValueEvent& event) 
     98{ 
     99  *(event.getValuePtr()) = mOsgImage->getInternalTextureFormat(); 
     100} 
     101 
     102/* virtual */ void 
     103av::osg::Image::setInternalTextureFormatCB(const SFInt::SetValueEvent& event) 
     104{ 
     105  mOsgImage->setInternalTextureFormat(event.getValue()); 
     106} 
Note: See TracChangeset for help on using the changeset viewer.