From Wang Rui, "The new osgShadow and osgFX serializers are attached, and some

modifications of the osgShadow header naming styles as well. The
osgDB::Serializer header is also changed to add new Vec2 serializer
macros because of the needs of osgShadow classes. It should compile
fine on both Windows and Linux. But I have only done a few tests to
generate .osgb, .osgt and .osgx formats with these new wrappers."
This commit is contained in:
Robert Osfield
2010-04-20 10:29:04 +00:00
parent a0781cba6c
commit a8c4fd8761
36 changed files with 496 additions and 21 deletions

View File

@@ -42,13 +42,13 @@ class OSGSHADOW_EXPORT StandardShadowMap : public DebugShadowMap
void setBaseTextureUnit( unsigned int unit )
{ _baseTextureUnit = unit; dirty(); }
unsigned int getBaseTextureUnit( void )
unsigned int getBaseTextureUnit( void ) const
{ return _baseTextureUnit; }
void setShadowTextureUnit( unsigned int unit )
{ _shadowTextureUnit = unit; dirty(); }
unsigned int getShadowTextureUnit( void )
unsigned int getShadowTextureUnit( void ) const
{ return _shadowTextureUnit; }
// Texture Indices are changed by search and replace on shader source
@@ -72,7 +72,7 @@ class OSGSHADOW_EXPORT StandardShadowMap : public DebugShadowMap
{ updateTextureCoordIndices( _baseTextureCoordIndex, index );
_baseTextureCoordIndex = index; }
unsigned int getBaseTextureCoordIndex( void )
unsigned int getBaseTextureCoordIndex( void ) const
{ return _baseTextureCoordIndex; }
// Texture Indices are changed by search and replace on shader source
@@ -82,13 +82,13 @@ class OSGSHADOW_EXPORT StandardShadowMap : public DebugShadowMap
{ updateTextureCoordIndices( _shadowTextureCoordIndex, index );
_shadowTextureCoordIndex = index; }
unsigned int getShadowTextureCoordIndex( void )
unsigned int getShadowTextureCoordIndex( void ) const
{ return _shadowTextureCoordIndex; }
void setTextureSize( const osg::Vec2s& textureSize )
{ _textureSize = textureSize; dirty(); }
osg::Vec2s getTextureSize( )
const osg::Vec2s& getTextureSize() const
{ return _textureSize; }
void setLight( osg::Light* light )
@@ -96,6 +96,9 @@ class OSGSHADOW_EXPORT StandardShadowMap : public DebugShadowMap
osg::Light* getLight( void )
{ return _light.get(); }
const osg::Light* getLight( void ) const
{ return _light.get(); }
osg::Shader * getShadowVertexShader()
{ return _shadowVertexShader.get(); }