Build fixes for when OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION is disabled

This commit is contained in:
Robert Osfield 2010-09-17 13:33:09 +00:00
parent b0db0382f5
commit 4daad70d17
5 changed files with 10 additions and 9 deletions

View File

@ -75,7 +75,7 @@ int main(int argc, char** argv)
while(arguments.read("--flat")) { bevel = new osgText::Bevel; bevel->flatBevel(0.25); }
while(arguments.read("--bevel-thickness",r)) { if (bevel.valid()) bevel->setBevelThickness(r); }
style->setBevel(bevel);
style->setBevel(bevel.get());
// set up outline.
while(arguments.read("--outline",r)) { style->setOutlineRatio(r); }

View File

@ -137,7 +137,7 @@ int main_test(int, char**)
osg::Geode* pGeodeSphere = new osg::Geode;
pGeodeSphere->addDrawable( new osg::ShapeDrawable( new osg::Sphere(osg::Vec3(0.0f,0.0f,0.0f),0.01f) ) );
rPat->addChild( pGeodeSphere );
pGroup->addChild( rPat );
pGroup->addChild( rPat.get() );
osg::Vec3 center(0.0f,0.0f,0.0f);
float radius = 1.0f;

View File

@ -93,7 +93,7 @@ void POVWriterNodeVisitor::apply( Geode& node )
itr != dl.end(); ++itr)
{
// get drawable
const Drawable *d = *itr;
const Drawable *d = itr->get();
// push state set
const StateSet *ss = d->getStateSet();
@ -103,12 +103,12 @@ void POVWriterNodeVisitor::apply( Geode& node )
Matrix m = _transformationStack.top();
// process lights
processLights( _stateSetStack.top(), m );
processLights( _stateSetStack.top().get(), m );
// process geometry
const Geometry *g = d->asGeometry();
if( g )
processGeometry( g, _stateSetStack.top(), m );
processGeometry( g, _stateSetStack.top().get(), m );
// pop state set
if( ss ) popStateSet( ss );

View File

@ -470,11 +470,11 @@ osg::Geometry* computeGlyphGeometry(osgText::Glyph3D* glyph, float bevelThicknes
{
Boundary boundaryInner(orig_vertices, itr->get());
boundaryInner.removeAllSegmentsBelowThickness(bevelThickness);
boundaryInner.newAddBoundaryToGeometry(new_geometry, bevelThickness, "face", "bevel");
boundaryInner.newAddBoundaryToGeometry(new_geometry.get(), bevelThickness, "face", "bevel");
Boundary boundaryOuter(orig_vertices, itr->get());
boundaryOuter.removeAllSegmentsAboveThickness(-shellThickness);
boundaryOuter.newAddBoundaryToGeometry(new_geometry, -shellThickness, "", "shell");
boundaryOuter.newAddBoundaryToGeometry(new_geometry.get(), -shellThickness, "", "shell");
}
}
@ -495,7 +495,7 @@ osg::Geometry* computeGlyphGeometry(osgText::Glyph3D* glyph, float bevelThicknes
++itr)
{
osg::PrimitiveSet* prim = itr->get();
if (prim->getName()=="face") face_geometry->addPrimitiveSet(copyop(*itr));
if (prim->getName()=="face") face_geometry->addPrimitiveSet(copyop(itr->get()));
else primitiveSets.push_back(prim);
}

View File

@ -111,7 +111,8 @@ void Text3D::setFont(Font* font)
void Text3D::setFont(const std::string & fontfile)
{
setFont(readRefFontFile(fontfile));
osg::ref_ptr<Font> font = readRefFontFile(fontfile);
setFont(font.get());
}
String::iterator Text3D::computeLastCharacterOnLine(osg::Vec2& cursor, String::iterator first,String::iterator last)