Set main scene graph elements to use thread safe ref/unref by default
This commit is contained in:
@@ -186,7 +186,7 @@ class OSG_EXPORT StateAttribute : public Object
|
||||
/** Simple pairing between an attribute type and the member within that attribute type group.*/
|
||||
typedef std::pair<Type,unsigned int> TypeMemberPair;
|
||||
|
||||
StateAttribute() {}
|
||||
StateAttribute();
|
||||
|
||||
StateAttribute(const StateAttribute& sa,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
|
||||
Object(sa,copyop) {}
|
||||
|
||||
@@ -245,6 +245,7 @@ void Drawable::flushDeletedVertexBufferObjects(unsigned int contextID,double /*c
|
||||
|
||||
|
||||
Drawable::Drawable()
|
||||
:Object(true)
|
||||
{
|
||||
_boundingBoxComputed = false;
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ using namespace osg;
|
||||
using namespace std;
|
||||
|
||||
Image::Image()
|
||||
:Object(true)
|
||||
{
|
||||
setDataVariance(STATIC);
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace osg
|
||||
}
|
||||
|
||||
Node::Node()
|
||||
:Object(true)
|
||||
{
|
||||
_boundingSphereComputed = false;
|
||||
_nodeMask = 0xffffffff;
|
||||
|
||||
@@ -18,6 +18,13 @@
|
||||
|
||||
using namespace osg;
|
||||
|
||||
|
||||
StateAttribute::StateAttribute()
|
||||
:Object(true)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void StateAttribute::addParent(osg::StateSet* object)
|
||||
{
|
||||
_parents.push_back(object);
|
||||
|
||||
@@ -91,6 +91,7 @@ void View::setLightingMode(LightingMode lightingMode)
|
||||
if (_lightingMode != NO_LIGHT && !_light)
|
||||
{
|
||||
_light = new osg::Light;
|
||||
_light->setThreadSafeRefUnref(true);
|
||||
_light->setLightNum(0);
|
||||
_light->setAmbient(Vec4(0.00f,0.0f,0.00f,1.0f));
|
||||
_light->setDiffuse(Vec4(0.8f,0.8f,0.8f,1.0f));
|
||||
|
||||
Reference in New Issue
Block a user