From 2861ca6d1a52560d10c2cfbc67c3a61b5ee7ed81 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 12 Aug 2007 12:15:21 +0000 Subject: [PATCH] Added support for SoftShadowMap into osgshadow example --- examples/osgshadow/osgshadow.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/osgshadow/osgshadow.cpp b/examples/osgshadow/osgshadow.cpp index 71c4edb2e..1f4b6b28c 100644 --- a/examples/osgshadow/osgshadow.cpp +++ b/examples/osgshadow/osgshadow.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -490,7 +491,7 @@ int main(int argc, char** argv) arguments.getApplicationUsage()->addCommandLineOption("--noUpdate", "Disable the updating the of light source."); arguments.getApplicationUsage()->addCommandLineOption("--base", "Add a base geometry to test shadows."); arguments.getApplicationUsage()->addCommandLineOption("--sv", "Select ShadowVolume implementation."); - arguments.getApplicationUsage()->addCommandLineOption("--sm", "Select ShadowMap implementation."); + arguments.getApplicationUsage()->addCommandLineOption("--ssm", "Select SoftShadowMap implementation."); arguments.getApplicationUsage()->addCommandLineOption("--sm", "Select ShadowMap implementation."); // arguments.getApplicationUsage()->addCommandLineOption("--pssm", "Select ParallelSplitShadowMap implementation."); arguments.getApplicationUsage()->addCommandLineOption("-1", "Use test model one."); @@ -619,6 +620,11 @@ int main(int argc, char** argv) shadowedScene->setShadowTechnique(pssm.get()); } #endif + else if (arguments.read("--ssm")) + { + osg::ref_ptr sm = new osgShadow::SoftShadowMap; + shadowedScene->setShadowTechnique(sm.get()); + } else /* if (arguments.read("--sm")) */ { osg::ref_ptr sm = new osgShadow::ShadowMap;