Changeset 3701 for OpenSceneGraph/trunk/examples/osgplanets/osgplanets.cpp
- Timestamp:
- 11/24/04 20:10:44 (8 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgplanets/osgplanets.cpp
r3688 r3701 456 456 if ( image ) 457 457 { 458 geodePlanet->getOrCreateStateSet()->setTextureAttributeAndModes( 0, new osg::Texture2D( image ), osg::StateAttribute::ON ); 458 osg::Texture2D* tex2d = new osg::Texture2D( image ); 459 tex2d->setWrap( osg::Texture::WRAP_S, osg::Texture::REPEAT ); 460 tex2d->setWrap( osg::Texture::WRAP_T, osg::Texture::REPEAT ); 461 geodePlanet->getOrCreateStateSet()->setTextureAttributeAndModes( 0, tex2d, osg::StateAttribute::ON ); 459 462 460 463 // reset the object color to white to allow the texture to set the colour. … … 492 495 493 496 stateset->setTextureAttribute( 1, texenv ); 494 stateset->setTextureAttributeAndModes( 1, new osg::Texture2D( image ), osg::StateAttribute::ON ); 497 osg::Texture2D* tex2d = new osg::Texture2D( image ); 498 tex2d->setWrap( osg::Texture::WRAP_S, osg::Texture::REPEAT ); 499 tex2d->setWrap( osg::Texture::WRAP_T, osg::Texture::REPEAT ); 500 stateset->setTextureAttributeAndModes( 1, tex2d, osg::StateAttribute::ON ); 495 501 } 496 502 }
