Changeset 6126 for OpenSceneGraph/trunk/examples/osgshadow/osgshadow.cpp
- Timestamp:
- 02/08/07 18:23:40 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgshadow/osgshadow.cpp
r6080 r6126 24 24 25 25 #include <osgShadow/OccluderGeometry> 26 #include <osgShadow/ShadowedScene> 27 #include <osgShadow/ShadowVolume> 26 28 27 29 #include <osgDB/ReadFile> … … 567 569 while (arguments.read("--two-pass")) drawMode = osgShadow::ShadowVolumeGeometry::STENCIL_TWO_PASS; 568 570 571 bool ShadowVolume = false; 572 while (arguments.read("--ShadowVolume")) ShadowVolume = true; 573 569 574 570 575 // set up the camera manipulators. … … 681 686 light->setPosition(lightpos); 682 687 683 if (!doShadow) 688 if (ShadowVolume) 689 { 690 osg::ref_ptr<osgShadow::ShadowedScene> shadowedScene = new osgShadow::ShadowedScene; 691 692 shadowedScene->setShadowTechnique(new osgShadow::ShadowVolume); 693 694 shadowedScene->addChild(model.get()); 695 696 group->addChild(shadowedScene.get()); 697 } 698 else if (!doShadow) 684 699 { 685 700 group->addChild(model.get());
