Changeset 4082 for OpenSceneGraph/trunk/examples/osgmovie/osgmovie.cpp
- Timestamp:
- 04/22/05 17:44:21 (8 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgmovie/osgmovie.cpp
r3856 r4082 243 243 } 244 244 245 osg:: Geode*geode = new osg::Geode;245 osg::ref_ptr<osg::Geode> geode = new osg::Geode; 246 246 osg::Vec3 pos(0.0f,0.0f,0.0f); 247 247 … … 253 253 osg::ImageStream* imagestream = dynamic_cast<osg::ImageStream*>(image); 254 254 if (imagestream) imagestream->play(); 255 geode->addDrawable(createTexturedQuadGeometry(pos,image->s(),image->t(),image));256 geode->getOrCreateStateSet()->setMode(GL_LIGHTING,osg::StateAttribute::OFF);257 255 258 pos.z() += image->t()*1.5f; 259 } 260 256 if (image) 257 { 258 geode->addDrawable(createTexturedQuadGeometry(pos,image->s(),image->t(),image)); 259 geode->getOrCreateStateSet()->setMode(GL_LIGHTING,osg::StateAttribute::OFF); 260 261 pos.z() += image->t()*1.5f; 262 } 263 else 264 { 265 std::cout<<"Unable to read file "<<arguments[i]<<std::endl; 266 } 267 } 268 } 269 270 if (geode->getNumDrawables()==0) 271 { 272 // nothing loaded. 273 return 1; 261 274 } 262 275 263 276 // pass the model to the MovieEventHandler so it can pick out ImageStream's to manipulate. 264 meh->set(geode );277 meh->set(geode.get()); 265 278 266 279 // report any errors if they have occured when parsing the program aguments. … … 295 308 296 309 // set the scene to render 297 viewer.setSceneData(geode );310 viewer.setSceneData(geode.get()); 298 311 299 312 // create the windows and run the threads.
