Moved DatabasePager into from osgProducer into osgDB. This means that osgDB
is now dependant on OpenThreads.
This commit is contained in:
@@ -93,6 +93,10 @@ LINK32=link.exe
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\osgProducer\DatabasePager.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Src\osgDB\DotOsgWrapper.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -149,6 +153,10 @@ SOURCE=..\..\Src\osgDB\WriteFile.cpp
|
||||
# PROP Default_Filter ";h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Include\osgProducer\DatabasePager
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Include\osgDB\DotOsgWrapper
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -95,10 +95,6 @@ LINK32=link.exe
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\osgProducer\DatabasePager.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\osgProducer\EventAdapter.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -131,10 +127,6 @@ SOURCE=..\..\src\osgProducer\ViewerEventHandler.cpp
|
||||
# PROP Default_Filter ";h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Include\osgProducer\DatabasePager
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Include\osgProducer\EventAdapter
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef OSGPRODUCER_DATABASEPAGER
|
||||
#define OSGPRODUCER_DATABASEPAGER 1
|
||||
#ifndef OSGDB_DATABASEPAGER
|
||||
#define OSGDB_DATABASEPAGER 1
|
||||
|
||||
#include <osg/NodeVisitor>
|
||||
#include <osg/Group>
|
||||
@@ -22,16 +22,16 @@
|
||||
#include <OpenThreads/Thread>
|
||||
#include <OpenThreads/Mutex>
|
||||
|
||||
#include <osgProducer/Export>
|
||||
#include <osgDB/Export>
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
namespace osgProducer {
|
||||
namespace osgDB {
|
||||
|
||||
/** Database paging class which manages the loading of files in a background thread,
|
||||
* and syncronizing of loaded models with the main scene graph.*/
|
||||
class OSGPRODUCER_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandler, public OpenThreads::Thread
|
||||
class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandler, public OpenThreads::Thread
|
||||
{
|
||||
public :
|
||||
|
||||
@@ -26,8 +26,9 @@
|
||||
#include <osg/FrameStamp>
|
||||
#include <osg/DisplaySettings>
|
||||
|
||||
#include <osgDB/DatabasePager>
|
||||
|
||||
#include <osgProducer/OsgSceneHandler>
|
||||
#include <osgProducer/DatabasePager>
|
||||
|
||||
namespace osgProducer {
|
||||
|
||||
@@ -190,7 +191,7 @@ class OSGPRODUCER_EXPORT OsgCameraGroup : public Producer::CameraGroup
|
||||
osg::Timer_t _start_tick;
|
||||
osg::ref_ptr<osg::FrameStamp> _frameStamp;
|
||||
|
||||
osg::ref_ptr<DatabasePager> _databasePager;
|
||||
osg::ref_ptr<osgDB::DatabasePager> _databasePager;
|
||||
|
||||
void _init();
|
||||
};
|
||||
|
||||
@@ -2,6 +2,7 @@ TOPDIR = ../..
|
||||
include $(TOPDIR)/Make/makedefs
|
||||
|
||||
CXXFILES =\
|
||||
DatabasePager.cpp\
|
||||
DynamicLibrary.cpp\
|
||||
FileNameUtils.cpp\
|
||||
FileUtils.cpp\
|
||||
|
||||
@@ -2,7 +2,6 @@ TOPDIR = ../..
|
||||
include $(TOPDIR)/Make/makedefs
|
||||
|
||||
CXXFILES =\
|
||||
DatabasePager.cpp\
|
||||
EventAdapter.cpp\
|
||||
KeyboardMouseCallback.cpp\
|
||||
OsgCameraGroup.cpp\
|
||||
|
||||
@@ -300,7 +300,7 @@ class DatabasePagerCompileCallback : public OsgSceneHandler::Callback
|
||||
{
|
||||
public:
|
||||
|
||||
DatabasePagerCompileCallback(DatabasePager* databasePager):
|
||||
DatabasePagerCompileCallback(osgDB::DatabasePager* databasePager):
|
||||
_databasePager(databasePager)
|
||||
{}
|
||||
|
||||
@@ -314,7 +314,7 @@ public:
|
||||
_databasePager->compileRenderingObjects(*(sh.getSceneView()->getState()),availableTime);
|
||||
}
|
||||
|
||||
osg::ref_ptr<DatabasePager> _databasePager;
|
||||
osg::ref_ptr<osgDB::DatabasePager> _databasePager;
|
||||
};
|
||||
|
||||
bool Viewer::realize()
|
||||
@@ -326,7 +326,7 @@ bool Viewer::realize()
|
||||
|
||||
// by default set up the DatabasePager.
|
||||
{
|
||||
_databasePager = new DatabasePager;
|
||||
_databasePager = new osgDB::DatabasePager;
|
||||
_databasePager->registerPagedLODs(getTopMostSceneData());
|
||||
|
||||
for(SceneHandlerList::iterator p=_shvec.begin();
|
||||
|
||||
Reference in New Issue
Block a user