- Removed OsgShadowVolume (deprecated on OSG 3.6)

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6536 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 421508d050df4666568d3d32eb4284fe175f2874
Former-commit-id: db47902a82d56d42a0b95dc67bf1f71aeb3482f4
This commit is contained in:
torcs-ng 2018-05-27 15:26:51 +00:00
parent 912f56f2eb
commit 0157e79761
3 changed files with 121 additions and 135 deletions

View file

@ -81,7 +81,6 @@
#define GR_ATT_SHADOW_SSM "soft shadowmap"
#define GR_ATT_SHADOW_PSSM "paralele shadowmap"
#define GR_ATT_SHADOW_LSPM "light shadowmap"
#define GR_ATT_SHADOW_VOLUME "shadow volume"
#define GR_ATT_SHADOW_VDSM "view dependent shadowmap"
#define GR_ATT_SHADOW_SIZE "texture shadow size"

View file

@ -61,7 +61,7 @@
#define SCARCE_CLOUD 5
#define COVERAGE_CLOUD 8
static const char* ShadowValues[] = { GR_ATT_SHADOW_NONE, GR_ATT_SHADOW_SM, GR_ATT_SHADOW_SSM, GR_ATT_SHADOW_PSSM, GR_ATT_SHADOW_LSPM, GR_ATT_SHADOW_VOLUME, GR_ATT_SHADOW_VDSM};
static const char* ShadowValues[] = { GR_ATT_SHADOW_NONE, GR_ATT_SHADOW_SM, GR_ATT_SHADOW_SSM, GR_ATT_SHADOW_PSSM, GR_ATT_SHADOW_LSPM, GR_ATT_SHADOW_VDSM};
static const int NbShadowValues = sizeof(ShadowValues) / sizeof(ShadowValues[0]);
static const char* TexSizeValues[] = { GR_ATT_SHADOW_512, GR_ATT_SHADOW_1024, GR_ATT_SHADOW_2048, GR_ATT_SHADOW_4096, GR_ATT_SHADOW_8192 };
static const int NbTexSizeValues = sizeof(TexSizeValues) / sizeof(TexSizeValues[0]);
@ -546,19 +546,6 @@ void SDRender::ShadowedScene()
shadowRoot->setShadowTechnique((lspsm.get()));
}
else if (ShadowIndex == 5)
{
osg::DisplaySettings::instance()->setMinimumNumStencilBits(8);
osg::ref_ptr<osgShadow::ShadowVolume> sv = new osgShadow::ShadowVolume;
sv->setDynamicShadowVolumes(1);
sv->setDrawMode(osgShadow::ShadowVolumeGeometry::GEOMETRY);
shadowRoot = new osgShadow::ShadowedScene;
shadowRoot->setReceivesShadowTraversalMask(rcvShadowMask);
shadowRoot->setCastsShadowTraversalMask(castShadowMask);
shadowRoot->setShadowTechnique((sv.get()));
}
else if (ShadowIndex == 6)
{
osg::ref_ptr<osgShadow::ShadowSettings> shadowSettings = new osgShadow::ShadowSettings;
shadowSettings->setTextureSize(osg::Vec2s(ShadowTexSize, ShadowTexSize));

View file

@ -37,7 +37,7 @@ static const char* BackgroundTypeValues[] = { GR_ATT_BGSKY_RING, GR_ATT_BGSKY_LA
static const int NbBackgroundTypeValues = sizeof(BackgroundTypeValues) / sizeof(BackgroundTypeValues[0]);
//static const char* SpectatorValues[] = { GR_ATT_AGR_NULL, GR_ATT_AGR_LITTLE, GR_ATT_AGR_MEDIUM, GR_ATT_AGR_FULL, GR_ATT_AGR_HIGH };
//static const int NbSpectatorValues = sizeof(SpectatorValues) / sizeof(SpectatorValues[0]);
static const char* ShadowValues[] = { GR_ATT_SHADOW_NONE, GR_ATT_SHADOW_SM, GR_ATT_SHADOW_SSM, GR_ATT_SHADOW_PSSM, GR_ATT_SHADOW_LSPM, GR_ATT_SHADOW_VOLUME, GR_ATT_SHADOW_VDSM};
static const char* ShadowValues[] = { GR_ATT_SHADOW_NONE, GR_ATT_SHADOW_SM, GR_ATT_SHADOW_SSM, GR_ATT_SHADOW_PSSM, GR_ATT_SHADOW_LSPM, GR_ATT_SHADOW_VDSM};
static const int NbShadowValues = sizeof(ShadowValues) / sizeof(ShadowValues[0]);
static const char* TexSizeValues[] = { GR_ATT_SHADOW_512, GR_ATT_SHADOW_1024, GR_ATT_SHADOW_2048, GR_ATT_SHADOW_4096, GR_ATT_SHADOW_8192 };
static const int NbTexSizeValues = sizeof(TexSizeValues) / sizeof(TexSizeValues[0]);