Changeset 335


Ignore:
Timestamp:
01/13/10 16:11:18 (2 years ago)
Author:
rkuck
Message:

CameraAttachment? can now contain an Image

Location:
trunk/avango-osg
Files:
3 edited

Legend:

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

    r299 r335  
    3636#include <avango/StandardFields.h> 
    3737#include <avango/osg/Texture.h> 
     38#include <avango/osg/Image.h> 
    3839 
    3940namespace av 
     
    6162      SFInt InternalFormat; 
    6263      SFTexture Texture; 
     64      SFImage Image; 
    6365      SFUInt Level; 
    6466      SFUInt Face; 
  • trunk/avango-osg/src/avango/osg/Camera.cpp

    r299 r335  
    204204      if (texture) a->Texture.setValue(texture); 
    205205    } 
     206    if (i->second._image) 
     207    { 
     208      Image* image = dynamic_cast<Image*>(i->second._image->getUserData()); 
     209      if (image) a->Image.setValue(image); 
     210    } 
    206211    a->Level.setValue(i->second._level); 
    207212    a->Face.setValue(i->second._face); 
     
    244249      attachment._texture = (*i)->Texture.getValue()->getOsgTexture(); 
    245250    } 
     251    if ((*i)->Image.getValue().isValid()) 
     252    { 
     253      attachment._image = (*i)->Image.getValue()->getOsgImage(); 
     254    } 
    246255    attachment._mipMapGeneration = (*i)->MIPMapGeneration.getValue(); 
    247256    attachment._multisampleSamples = (*i)->MultisampleSamples.getValue(); 
  • trunk/avango-osg/src/avango/osg/CameraAttachment.cpp

    r299 r335  
    2525 
    2626#include <avango/osg/CameraAttachment.h> 
    27 #include <avango/osg/Texture.h> 
    2827#include <osg/Camera> 
    2928#include <avango/Logger.h> 
     
    4544  AV_FC_ADD_FIELD(InternalFormat, GL_RGBA); 
    4645  AV_FC_ADD_FIELD(Texture, Link< ::av::osg::Texture >()); 
     46  AV_FC_ADD_FIELD(Image, Link< ::av::osg::Image >()); 
    4747  AV_FC_ADD_FIELD(Level, 0); 
    4848  AV_FC_ADD_FIELD(Face, 0); 
Note: See TracChangeset for help on using the changeset viewer.