Public Member Functions | Private Member Functions | Private Attributes

fx::Texture Class Reference

Texture class abstracts a texture object. More...

#include <_src_fx_texture.hh>

List of all members.

Public Member Functions

 Texture (uint8 *buf, const uint width, const osg::Image::AllocationMode allocationMode)
 Texture (RefPtr< osg::Image > image)
 Texture (const string &filename)
 ~Texture ()
void Bind (osg::StateSet &stateset)
bool SaveToFile (const string &filename)
CLASS_METHOD RefPtr
< osg::StateSet > 
NewTextureAsStateSet (const string &filename)

Private Member Functions

void Configure (void)

Private Attributes

RefPtr< osg::Texture2D > mTextureObject

Detailed Description

Texture class abstracts a texture object.

Texture class facilitates constructing textures in various ways. Textures constructed from files use ImageCache.


Constructor & Destructor Documentation

fx::Texture::Texture ( uint8 *  buf,
const uint  width,
const osg::Image::AllocationMode  allocationMode 
)
fx::Texture::Texture ( RefPtr< osg::Image >  image  ) 
fx::Texture::Texture ( const string &  filename  ) 

Construct Texture from file. Uses ImageCache.

fx::Texture::~Texture (  ) 

dtor.


Member Function Documentation

void fx::Texture::Bind ( osg::StateSet &  stateset  ) 

Attach texture to node.

void fx::Texture::Configure ( void   )  [inline, private]
RefPtr< osg::StateSet > fx::Texture::NewTextureAsStateSet ( const string &  filename  ) 

Create osg::StateSet with new Texture bound to it.

bool fx::Texture::SaveToFile ( const string &  filename  ) 

Write texture image to file.

Returns:
True else exception.

Member Data Documentation

RefPtr<osg::Texture2D> fx::Texture::mTextureObject [private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Palomino Flight Simulator documents generated by doxygen 1.7.1 on Tue May 15 2012 22:40:11