1
0
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:
scrawl 2017-02-04 02:24:42 +01:00
parent 33e654f94d
commit a1069dce3c
2 changed files with 3 additions and 9 deletions

View File

@ -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);
}

View File

@ -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.