14#ifndef OSGSHADOW_SHADOWEMAP
15#define OSGSHADOW_SHADOWEMAP 1
64 typedef std::vector< osg::ref_ptr<osg::Uniform> >
UniformList;
66 typedef std::vector< osg::ref_ptr<osg::Shader> >
ShaderList;
111 class DrawableDrawWithDepthShadowComparisonOffCallback;
Vec2f Vec2
Definition Vec2:21
The osgShadow library is a NodeKit that extends the core scene graph to add support for a range of sh...
Definition ConvexPolyhedron:33
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Light state class which encapsulates OpenGL glLight() functionality.
Definition Light:40
Leaf Node for defining a light in the scene.
Definition LightSource:25
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
T * get() const
Definition ref_ptr:117
osg::Shader is an application-level abstraction of an OpenGL glShader.
Definition Shader:89
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
META_Object(osgShadow, ShadowMap)
osg::ref_ptr< osg::Camera > makeDebugHUD()
osg::ref_ptr< osg::StateSet > _stateset
Definition ShadowMap:116
virtual void update(osg::NodeVisitor &nv)
run the update traversal of the ShadowedScene and update any loca chached data structures.
osg::ref_ptr< osg::Program > _program
Definition ShadowMap:117
virtual void cull(osgUtil::CullVisitor &cv)
run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.
UniformList _uniformList
Definition ShadowMap:123
osg::Vec2 _ambientBias
Definition ShadowMap:128
osg::ref_ptr< osg::Light > _light
Definition ShadowMap:118
void addShader(const osg::ref_ptr< T > &shader)
Definition ShadowMap:71
void setTextureUnit(unsigned int unit)
Set the texture unit that the shadow texture will be applied on.
void setLight(osg::Light *light)
Set the Light that will cast shadows.
virtual void init()
initialize the ShadowedScene and local cached data structures.
const osg::Vec2s & getTextureSize() const
Get the values that are used for the ambient bias in the shader.
Definition ShadowMap:58
osg::Vec2s _textureSize
Definition ShadowMap:129
unsigned int _baseTextureUnit
Definition ShadowMap:125
void setTextureSize(const osg::Vec2s &textureSize)
set the size in pixels x / y for the shadow texture.
unsigned int getTextureUnit() const
Get the texture unit that the shadow texture will be applied on.
Definition ShadowMap:40
virtual void cleanSceneGraph()
Clean scene graph from any shadow technique specific nodes, state and drawables.
osg::ref_ptr< osg::Camera > _camera
Definition ShadowMap:113
void setAmbientBias(const osg::Vec2 &ambientBias)
Set the values for the ambient bias the shader will use.
osg::ref_ptr< osg::LightSource > _ls
Definition ShadowMap:120
osg::ref_ptr< osg::Uniform > _ambientBiasUniform
Definition ShadowMap:122
void clearShaderList()
Reset internal shader list.
Definition ShadowMap:74
virtual ~ShadowMap(void)
Definition ShadowMap:103
void setLight(osg::LightSource *ls)
virtual void createUniforms()
Create the managed Uniforms.
osg::Vec2 _polyOffset
Definition ShadowMap:127
virtual void resizeGLObjectBuffers(unsigned int maxSize)
Resize any per context GLObject buffers to specified size.
void addShader(osg::Shader *shader)
Add a shader to internal list, will be used instead of the default ones.
Definition ShadowMap:69
ShaderList _shaderList
Definition ShadowMap:124
const osg::Vec2 & getAmbientBias() const
Get the values that are used for the ambient bias in the shader.
Definition ShadowMap:52
std::vector< osg::ref_ptr< osg::Shader > > ShaderList
Definition ShadowMap:66
osg::ref_ptr< osg::Texture2D > _texture
Definition ShadowMap:115
void setPolygonOffset(const osg::Vec2 &polyOffset)
set the polygon offset used initially
osg::ref_ptr< osg::TexGen > _texgen
Definition ShadowMap:114
virtual void releaseGLObjects(osg::State *=0) const
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics...
ShadowMap(const ShadowMap &es, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
std::vector< osg::ref_ptr< osg::Uniform > > UniformList
Definition ShadowMap:64
unsigned int _shadowTextureUnit
Definition ShadowMap:126
const osg::Vec2 & getPolygonOffset() const
get the used polygon offset
Definition ShadowMap:46
virtual void createShaders()
Basic NodeVisitor implementation for rendering a scene.
Definition CullVisitor:49
#define OSGSHADOW_EXPORT
Definition Export:39