page 63, fig 2-9
The State example scene graph displayed in osgviewer TBD move
TBD move?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
http://www.skew-matrix.com/OSGQSG/
p37, Memeory Management Examples.
Misspelled Memory in the errata.
-
p37, Memory Management Examples.
There are multiple solutions to the dilemma of how to return a Referenced object
address. The method employed in this book's example code is
Misspelled Memory in the errata.
Fixed, thanks.
Why is it
return grp.get();
rather than
return grp;
Isn't grp.get() a pointer to an osg::Group?
osg::ref_ptr has a constructor that takes an address.
-Paul
___
osg-users mailing list
So when I see things like the following in the OSG code base is it wrong?
ApplicationUsage* ApplicationUsage::instance()
{
static osg::ref_ptrApplicationUsage s_applicationUsage = new
ApplicationUsage;
return s_applicationUsage.get();
}
To me this looks like your first example.
// DON'T
Hi Fred,
Returning a C pointer is more flexible, and as long as ref counting is
managed cleanly everything works fine, so the
ApplicationUsage::instance() code you suggest is perfectly fine, and
avoids thrashing the reference count something that is helps on the
performance front.
One little
So when I see things like the following in the OSG code base
is it wrong?
ApplicationUsage* ApplicationUsage::instance() {
static osg::ref_ptrApplicationUsage s_applicationUsage
= new ApplicationUsage;
return s_applicationUsage.get();
}
In the code above, s_applicationUsage is
Ah yes, static makes a world of difference.
page 47
osg::ref_ptrosg::Geode geode0 = new osg::Geode;
group-addChild( Geode0.get() );
osg::ref_ptrosg::Geode geode1 = new osg::Geode;
group-addChild( Geode1.get() );
Upper case problem with Geode0 and Geode1. They should be geode0 and
reprinting.
-Paul
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Fred
Sent: Wednesday, December 03, 2008 2:17 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] OSGQSG: Error
Ah yes, static makes a world of difference
8 matches
Mail list logo