mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Change UnrefQueue to accept osg::Referenced instead of osg::Object
This commit is contained in:
parent
33e654f94d
commit
a1069dce3c
@ -2,7 +2,6 @@
|
||||
|
||||
#include <deque>
|
||||
|
||||
#include <osg/Object>
|
||||
//#include <osg/Timer>
|
||||
//#include <iostream>
|
||||
|
||||
@ -14,7 +13,7 @@ namespace SceneUtil
|
||||
class UnrefWorkItem : public SceneUtil::WorkItem
|
||||
{
|
||||
public:
|
||||
std::deque<osg::ref_ptr<const osg::Object> > mObjects;
|
||||
std::deque<osg::ref_ptr<const osg::Referenced> > mObjects;
|
||||
|
||||
virtual void doWork()
|
||||
{
|
||||
@ -30,7 +29,7 @@ namespace SceneUtil
|
||||
mWorkItem = new UnrefWorkItem;
|
||||
}
|
||||
|
||||
void UnrefQueue::push(const osg::Object *obj)
|
||||
void UnrefQueue::push(const osg::Referenced *obj)
|
||||
{
|
||||
mWorkItem->mObjects.push_back(obj);
|
||||
}
|
||||
|
@ -4,11 +4,6 @@
|
||||
#include <osg/ref_ptr>
|
||||
#include <osg/Referenced>
|
||||
|
||||
namespace osg
|
||||
{
|
||||
class Object;
|
||||
}
|
||||
|
||||
namespace SceneUtil
|
||||
{
|
||||
class WorkQueue;
|
||||
@ -22,7 +17,7 @@ namespace SceneUtil
|
||||
UnrefQueue();
|
||||
|
||||
/// 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.
|
||||
/// Call from the main thread.
|
||||
|
Loading…
Reference in New Issue
Block a user