Added s/getTextureSize() method for setting the shadow map texture size.

This commit is contained in:
Robert Osfield
2011-09-02 10:16:16 +00:00
parent f476406ae1
commit 52c2bc3ff5
2 changed files with 13 additions and 4 deletions

View File

@@ -159,6 +159,12 @@ class OSGSHADOW_EXPORT ViewDependentShadowMap : public ShadowTechnique
/** Get the texture unit that the first shadow map will be placed on.*/
unsigned int getBaseShadowTextureUnit() const { return _baseShadowTextureUnit; }
/** Set the size of the shadow map textures.*/
void setTextureSize(const osg::Vec2s& textureSize) { _textureSize = textureSize; }
/** Get the size of the shadow map textures.*/
const osg::Vec2s& getTextureSize() const { return _textureSize; }
enum ShadowMapProjectionHint
{
ORTHOGRAPHIC_SHADOW_MAP,
@@ -203,6 +209,7 @@ protected:
ViewDependentDataMap _viewDependentDataMap;
unsigned int _baseShadowTextureUnit;
osg::Vec2s _textureSize;
osg::ref_ptr<osg::StateSet> _shadowRecievingPlaceholderStateSet;