4 #include <osg/ShadeModel>
5 #include <osg/CullFace>
6 #include <osg/ShapeDrawable>
13 using namespace vrecko;
26 virtual void preInitialize()
28 BeforeInitialization();
31 _pPhysicsSDK = NxCreatePhysicsSDK(NX_PHYSICS_SDK_VERSION);
36 virtual void postInitialize()
38 AfterInitialization();
50 bool addUserDrawable(osg::Drawable *userDrawable)
52 osg::Geode* main_geode =
new osg::Geode;
53 main_geode->setName(
"userDrawable: "+userDrawable->getName());
56 osg::StateSet* stateset2 =
new osg::StateSet;
57 osg::ShadeModel* shademodel =
new osg::ShadeModel;
58 shademodel->setMode(osg::ShadeModel::SMOOTH);
59 stateset2->setAttributeAndModes(shademodel,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
60 osg::CullFace *modelCullFace =
new osg::CullFace();
61 modelCullFace->setMode(osg::CullFace::BACK);
62 stateset2->setAttributeAndModes(modelCullFace, osg::StateAttribute::ON);
63 main_geode->setStateSet(stateset2);
65 main_geode->addDrawable(userDrawable);