forked from mirror/openmw-tes3mp
Change UnrefQueue to accept osg::Referenced instead of osg::Object
This commit is contained in:
parent
33e654f94d
commit
a1069dce3c
2 changed files with 3 additions and 9 deletions
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
||||||
#include <osg/Object>
|
|
||||||
//#include <osg/Timer>
|
//#include <osg/Timer>
|
||||||
//#include <iostream>
|
//#include <iostream>
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@ namespace SceneUtil
|
||||||
class UnrefWorkItem : public SceneUtil::WorkItem
|
class UnrefWorkItem : public SceneUtil::WorkItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
std::deque<osg::ref_ptr<const osg::Object> > mObjects;
|
std::deque<osg::ref_ptr<const osg::Referenced> > mObjects;
|
||||||
|
|
||||||
virtual void doWork()
|
virtual void doWork()
|
||||||
{
|
{
|
||||||
|
@ -30,7 +29,7 @@ namespace SceneUtil
|
||||||
mWorkItem = new UnrefWorkItem;
|
mWorkItem = new UnrefWorkItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnrefQueue::push(const osg::Object *obj)
|
void UnrefQueue::push(const osg::Referenced *obj)
|
||||||
{
|
{
|
||||||
mWorkItem->mObjects.push_back(obj);
|
mWorkItem->mObjects.push_back(obj);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,11 +4,6 @@
|
||||||
#include <osg/ref_ptr>
|
#include <osg/ref_ptr>
|
||||||
#include <osg/Referenced>
|
#include <osg/Referenced>
|
||||||
|
|
||||||
namespace osg
|
|
||||||
{
|
|
||||||
class Object;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace SceneUtil
|
namespace SceneUtil
|
||||||
{
|
{
|
||||||
class WorkQueue;
|
class WorkQueue;
|
||||||
|
@ -22,7 +17,7 @@ namespace SceneUtil
|
||||||
UnrefQueue();
|
UnrefQueue();
|
||||||
|
|
||||||
/// Adds an object to the list of objects to be unreferenced. Call from the main thread.
|
/// Adds an object to the list of objects to be unreferenced. Call from the main thread.
|
||||||
void push(const osg::Object* obj);
|
void push(const osg::Referenced* obj);
|
||||||
|
|
||||||
/// Adds a WorkItem to the given WorkQueue that will clear the list of objects in a worker thread, thus unreferencing them.
|
/// Adds a WorkItem to the given WorkQueue that will clear the list of objects in a worker thread, thus unreferencing them.
|
||||||
/// Call from the main thread.
|
/// Call from the main thread.
|
||||||
|
|
Loading…
Reference in a new issue