Ignore:
Timestamp:
01/14/10 00:05:49 (2 years ago)
Author:
ddangelo
Message:

Field for setting the 2D texture of the Quad added. To be backward compatible and to avoid confusion, a bool field which controls the functionality to load a texture directly from an image file added. Default is true, so no existing code should break. If set to false, the field Filename will be ignored and the Texture field must be used to set the texture of the Quad.

File:
1 edited

Legend:

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

    r1 r336  
    3434#include <avango/osg/Geometry.h> 
    3535#include <osg/Texture2D> 
     36#include <avango/osg/Texture2D.h> 
    3637#include <osgDB/ReadFile> 
    3738#include <avango/osg/Fields.h> 
     
    7172      SFVec4 Color; 
    7273      SFVec3 Position; 
     74      SFTexture2D Texture; 
     75      //Due to backwards compatibility, thie flag indicates if the field Filename can be used to load a texture directly. 
     76      //If this is set to False, the Texture field must be used directly. Default is True 
     77      SFBool UseFilename; 
    7378      SFString Filename; 
    7479      SFInt MinFilter; 
     
    7984      /* virtual */ void evaluateLocalSideEffect(); 
    8085 
    81  
    82       /** 
     86          /** 
    8387       * Get the ::osg::Texture object. 
    8488       * \return an osg::ref pointer to the texture object 
     
    9599      ::osg::ref_ptr< ::osg::Vec4Array> mColors; 
    96100      ::osg::ref_ptr< ::osg::Vec2Array> mTexCoords; 
    97       ::osg::ref_ptr< ::osg::Texture2D> mOsgTexture; 
    98101 
    99102      void updateGeometry(); 
Note: See TracChangeset for help on using the changeset viewer.