osgPPU::UnitTexture Class Reference

Texture unit is used to setup external textures in the unit graph. More...

Inheritance diagram for osgPPU::UnitTexture:

osgPPU::Unit

Public Member Functions

 META_Node (osgPPU, UnitTexture)
 UnitTexture (const UnitTexture &u, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 UnitTexture (osg::Texture *tex)
void init ()
void setTexture (osg::Texture *tex)
osg::Texture * getTexture ()

Detailed Description

Texture unit is used to setup external textures in the unit graph.

If you like to have an external texture as input to any unit in the unit graph, then you have to setup this behaviour with the help of this unit. Place this unit as a parent of any other unit and its output, the texture, will became input to that unit.


Member Function Documentation

void osgPPU::UnitTexture::init (  )  [virtual]

Initialze the unit. This method should be overwritten by the derived classes to support non-standard initialization routines. If an unit is marked as dirty this method will be used to resetup the unit. Hence do provide a "reinitialable"-code here ;-)

Reimplemented from osgPPU::Unit.

void osgPPU::UnitTexture::setTexture ( osg::Texture *  tex  ) 

Set a texture which is used as output of this unit. The children will get this texture as input atomatically.

osg::Texture* osgPPU::UnitTexture::getTexture (  ) 

Get texture which is used as output of this unit.


The documentation for this class was generated from the following file:

Back to Homepage of osgPPU

Copyright (C) 2008 by Art Tevs (LGPL)