Fleshed out a bit more of the ShadowTexture implementation
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#define OSGSHADOW_SHADOWETEXTURE 1
|
||||
|
||||
#include <osg/Camera>
|
||||
#include <osg/Material>
|
||||
|
||||
#include <osgShadow/ShadowTechnique>
|
||||
|
||||
@@ -30,10 +31,36 @@ class OSGSHADOW_EXPORT ShadowTexture : public ShadowTechnique
|
||||
|
||||
META_Object(osgShadow, ShadowTexture);
|
||||
|
||||
/** Set the texture unit that the shadow texture will be applied on.*/
|
||||
void setTextureUnit(unsigned int unit);
|
||||
|
||||
/** Get the texture unit that the shadow texture will be applied on.*/
|
||||
unsigned int getTextureUnit() const { return _textureUnit; }
|
||||
|
||||
|
||||
/** initialize the ShadowedScene and local cached data structures.*/
|
||||
virtual void init();
|
||||
|
||||
/** run the update traversal of the ShadowedScene and update any loca chached data structures.*/
|
||||
virtual void update(osg::NodeVisitor& nv);
|
||||
|
||||
/** run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.*/
|
||||
virtual void cull(osgUtil::CullVisitor& cv);
|
||||
|
||||
/** Clean scene graph from any shadow technique specific nodes, state and drawables.*/
|
||||
virtual void cleanSceneGraph();
|
||||
|
||||
|
||||
protected :
|
||||
|
||||
virtual ~ShadowTexture() {}
|
||||
|
||||
|
||||
osg::ref_ptr<osg::Camera> _camera;
|
||||
osg::ref_ptr<osg::TexGen> _texgen;
|
||||
osg::ref_ptr<osg::Texture2D> _texture;
|
||||
osg::ref_ptr<osg::StateSet> _stateset;
|
||||
osg::ref_ptr<osg::Material> _material;
|
||||
unsigned int _textureUnit;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user