Moved DatabasePager into from osgProducer into osgDB. This means that osgDB

is now dependant on OpenThreads.
This commit is contained in:
Robert Osfield
2003-07-21 08:19:36 +00:00
parent 029e2aa47f
commit 325dc0f6b7
7 changed files with 20 additions and 19 deletions

View File

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

View 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

View 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 :

View File

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

View File

@@ -2,6 +2,7 @@ TOPDIR = ../..
include $(TOPDIR)/Make/makedefs
CXXFILES =\
DatabasePager.cpp\
DynamicLibrary.cpp\
FileNameUtils.cpp\
FileUtils.cpp\

View File

@@ -2,7 +2,6 @@ TOPDIR = ../..
include $(TOPDIR)/Make/makedefs
CXXFILES =\
DatabasePager.cpp\
EventAdapter.cpp\
KeyboardMouseCallback.cpp\
OsgCameraGroup.cpp\

View File

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