17#ifndef OSGSHADOW_STANDARDSHADOWMAP
18#define OSGSHADOW_STANDARDSHADOWMAP 1
141 (
unsigned int baseTexCoordIndex,
unsigned int shadowTexCoordIndex );
144 (
osg::Shader*, std::string fromString, std::string toString );
#define META_ViewDependentShadowTechniqueData(ShadowTechnique, TechniqueData)
META_ViewDependentShadowTechniqueData macro defines initViewDependentData method used by derived shad...
Definition ViewDependentShadowTechnique:32
Vec3f Vec3
Definition Vec3:21
BoundingSphered BoundingSphere
Definition BoundingSphere:308
Vec4f Vec4
Definition Vec4: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
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
DebugShadowMap()
Classic OSG constructor.
Definition DebugShadowMap:109
unsigned int _shadowTextureCoordIndex
Definition StandardShadowMap:158
osg::Shader * getShadowVertexShader()
Definition StandardShadowMap:103
osg::Shader * getShadowFragmentShader()
Definition StandardShadowMap:106
void setTextureSize(const osg::Vec2s &textureSize)
Definition StandardShadowMap:88
osg::ref_ptr< osg::Light > _light
Definition StandardShadowMap:151
void setLight(osg::Light *light)
Definition StandardShadowMap:94
void setBaseTextureUnit(unsigned int unit)
Definition StandardShadowMap:42
void setBaseTextureCoordIndex(unsigned int index)
Definition StandardShadowMap:71
unsigned int getBaseTextureUnit(void) const
Definition StandardShadowMap:45
unsigned int _baseTextureCoordIndex
Definition StandardShadowMap:157
virtual void resizeGLObjectBuffers(unsigned int maxSize)
Resize any per context GLObject buffers to specified size.
virtual ~StandardShadowMap(void)
Classic protected OSG destructor.
osg::Vec2s _textureSize
Definition StandardShadowMap:154
unsigned int getShadowTextureCoordIndex(void) const
Definition StandardShadowMap:85
const osg::Vec2s & getTextureSize() const
Definition StandardShadowMap:91
unsigned int _shadowTextureUnit
Definition StandardShadowMap:156
void setShadowTextureCoordIndex(unsigned int index)
Definition StandardShadowMap:81
META_Object(osgShadow, StandardShadowMap)
Declaration of standard OSG object methods.
virtual void searchAndReplaceShaderSource(osg::Shader *, std::string fromString, std::string toString)
StandardShadowMap(const StandardShadowMap &ssm, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Classic OSG cloning constructor.
void setMainVertexShader(osg::Shader *shader)
Definition StandardShadowMap:121
osg::Shader * getMainVertexShader()
Definition StandardShadowMap:109
unsigned int getShadowTextureUnit(void) const
Definition StandardShadowMap:51
void setMainFragmentShader(osg::Shader *shader)
Definition StandardShadowMap:124
void setShadowVertexShader(osg::Shader *shader)
Definition StandardShadowMap:115
osg::ref_ptr< osg::Shader > _mainFragmentShader
Definition StandardShadowMap:147
unsigned int _baseTextureUnit
Definition StandardShadowMap:155
osg::ref_ptr< osg::Shader > _mainVertexShader
Definition StandardShadowMap:146
float _polygonOffsetFactor
Definition StandardShadowMap:152
osg::ref_ptr< osg::Shader > _shadowVertexShader
Definition StandardShadowMap:148
StandardShadowMap()
Classic OSG constructor.
DebugShadowMap BaseClass
Convenient typedef used in definition of ViewData struct and methods.
Definition StandardShadowMap:30
virtual void updateTextureCoordIndices(unsigned int baseTexCoordIndex, unsigned int shadowTexCoordIndex)
StandardShadowMap ThisClass
Convenient typedef used in definition of ViewData struct and methods.
Definition StandardShadowMap:28
void setShadowFragmentShader(osg::Shader *shader)
Definition StandardShadowMap:118
osg::Shader * getMainFragmentShader()
Definition StandardShadowMap:112
const osg::Light * getLight(void) const
Definition StandardShadowMap:100
virtual void releaseGLObjects(osg::State *=0) const
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics...
void setShadowTextureUnit(unsigned int unit)
Definition StandardShadowMap:48
float _polygonOffsetUnits
Definition StandardShadowMap:153
osg::Light * getLight(void)
Definition StandardShadowMap:97
osg::ref_ptr< osg::Shader > _shadowFragmentShader
Definition StandardShadowMap:149
unsigned int getBaseTextureCoordIndex(void) const
Definition StandardShadowMap:75
Definition StandardShadowMap:161
virtual void cullShadowCastingScene()
virtual void resizeGLObjectBuffers(unsigned int maxSize)
unsigned int * _shadowTextureUnitPtr
Definition StandardShadowMap:164
virtual void init(ThisClass *st, osgUtil::CullVisitor *cv)
virtual void addShadowReceivingTexGen()
osg::ref_ptr< osg::Light > * _lightPtr
Definition StandardShadowMap:162
osg::ref_ptr< osg::TexGen > _texgen
Definition StandardShadowMap:172
virtual void releaseGLObjects(osg::State *=0) const
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics...
virtual void aimShadowCastingCamera(const osg::BoundingSphere &bounds, const osg::Light *light, const osg::Vec4 &worldLightPos, const osg::Vec3 &worldLightDir, const osg::Vec3 &worldLightUp=osg::Vec3(0, 1, 0))
virtual void cullShadowReceivingScene()
virtual void aimShadowCastingCamera(const osg::Light *light, const osg::Vec4 &worldLightPos, const osg::Vec3 &worldLightDir, const osg::Vec3 &worldLightUp=osg::Vec3(0, 1, 0))
unsigned int * _baseTextureUnitPtr
Definition StandardShadowMap:163
virtual const osg::Light * selectLight(osg::Vec4 &viewLightPos, osg::Vec3 &viewLightDir)
virtual void cull()
Method called by ViewDependentShadowTechnique to allow ViewData do the hard work computing shadows fo...
osg::ref_ptr< osg::StateSet > _stateset
Definition StandardShadowMap:173
virtual void dirty()
Dirty view data bits and force update of view data resources.
Basic NodeVisitor implementation for rendering a scene.
Definition CullVisitor:49
#define OSGSHADOW_EXPORT
Definition Export:39