Merge branch 'releases/2.2.0' into next
Conflicts: CMakeModules/FindSvnClient.cmake src/FDM/JSBSim/JSBSim.cxx
This commit is contained in:
commit
9c98258ab0
3 changed files with 46 additions and 70 deletions
|
@ -19,17 +19,7 @@ if(HAVE_APR_CONFIG)
|
||||||
string(STRIP ${RAW_APR_LIBS} APR_LIBS)
|
string(STRIP ${RAW_APR_LIBS} APR_LIBS)
|
||||||
|
|
||||||
else(HAVE_APR_CONFIG)
|
else(HAVE_APR_CONFIG)
|
||||||
FIND_LIBRARY(APR_LIBS
|
message(STATUS "apr-1-config not found, implement manual search for APR")
|
||||||
NAMES libapr-1 apr-1
|
|
||||||
HINTS
|
|
||||||
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
|
|
||||||
PATHS
|
|
||||||
~/Library/Frameworks
|
|
||||||
/Library/Frameworks
|
|
||||||
/usr/local
|
|
||||||
/usr
|
|
||||||
/opt
|
|
||||||
)
|
|
||||||
endif(HAVE_APR_CONFIG)
|
endif(HAVE_APR_CONFIG)
|
||||||
|
|
||||||
find_path(LIBSVN_INCLUDE_DIR svn_client.h
|
find_path(LIBSVN_INCLUDE_DIR svn_client.h
|
||||||
|
@ -42,49 +32,17 @@ find_path(LIBSVN_INCLUDE_DIR svn_client.h
|
||||||
/opt
|
/opt
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(SVNCLIENT_LIBRARY
|
check_library_exists(svn_client-1 svn_client_checkout "" HAVE_LIB_SVNCLIENT)
|
||||||
NAMES libsvn_client-1 svn_client-1
|
check_library_exists(svn_subr-1 svn_cmdline_init "" HAVE_LIB_SVNSUBR)
|
||||||
HINTS
|
check_library_exists(svn_ra-1 svn_ra_initialize "" HAVE_LIB_SVNRA)
|
||||||
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
|
|
||||||
PATHS
|
|
||||||
~/Library/Frameworks
|
|
||||||
/Library/Frameworks
|
|
||||||
/usr/local
|
|
||||||
/usr
|
|
||||||
/opt
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(SVNSUBR_LIBRARY
|
|
||||||
NAMES libsvn_subr-1 svn_subr-1
|
|
||||||
HINTS
|
|
||||||
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
|
|
||||||
PATHS
|
|
||||||
~/Library/Frameworks
|
|
||||||
/Library/Frameworks
|
|
||||||
/usr/local
|
|
||||||
/usr
|
|
||||||
/opt
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(SVNRA_LIBRARY
|
|
||||||
NAMES libsvn_ra-1 svn_ra-1
|
|
||||||
HINTS
|
|
||||||
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
|
|
||||||
PATHS
|
|
||||||
~/Library/Frameworks
|
|
||||||
/Library/Frameworks
|
|
||||||
/usr/local
|
|
||||||
/usr
|
|
||||||
/opt
|
|
||||||
)
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSVN DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSVN DEFAULT_MSG
|
||||||
SVNSUBR_LIBRARY
|
HAVE_LIB_SVNSUBR
|
||||||
SVNCLIENT_LIBRARY
|
HAVE_LIB_SVNCLIENT
|
||||||
SVNRA_LIBRARY
|
HAVE_LIB_SVNRA
|
||||||
LIBSVN_INCLUDE_DIR)
|
LIBSVN_INCLUDE_DIR)
|
||||||
|
|
||||||
if(LIBSVN_FOUND)
|
if(LIBSVN_FOUND)
|
||||||
set(LIBSVN_LIBRARIES ${SVNCLIENT_LIBRARY} ${SVNSUBR_LIBRARY} ${SVNRA_LIBRARY} ${APR_LIBS})
|
set(LIBSVN_LIBRARIES "svn_client-1" "svn_subr-1" "svn_ra-1" ${APR_LIBS})
|
||||||
endif(LIBSVN_FOUND)
|
endif(LIBSVN_FOUND)
|
||||||
|
|
|
@ -44,15 +44,12 @@ SceneryPager::~SceneryPager()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if SG_PAGEDLOD_HAS_OPTIONS
|
||||||
|
#else
|
||||||
void SceneryPager::requestNodeFile(const std::string& fileName, Group* group,
|
void SceneryPager::requestNodeFile(const std::string& fileName, Group* group,
|
||||||
float priority, const FrameStamp* framestamp,
|
float priority, const FrameStamp* framestamp,
|
||||||
ref_ptr<Referenced>& databaseRequest,
|
ref_ptr<Referenced>& databaseRequest,
|
||||||
#if SG_OSG_MIN_VERSION_REQUIRED(2,9,5)
|
osgDB::ReaderWriter::Options* options)
|
||||||
const osg::Referenced* options
|
|
||||||
#else
|
|
||||||
osgDB::ReaderWriter::Options* options
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
simgear::SGPagedLOD *sgplod = dynamic_cast<simgear::SGPagedLOD*>(group);
|
simgear::SGPagedLOD *sgplod = dynamic_cast<simgear::SGPagedLOD*>(group);
|
||||||
if(sgplod)
|
if(sgplod)
|
||||||
|
@ -64,6 +61,7 @@ void SceneryPager::requestNodeFile(const std::string& fileName, Group* group,
|
||||||
databaseRequest,
|
databaseRequest,
|
||||||
options);
|
options);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void SceneryPager::queueRequest(const std::string& fileName, Group* group,
|
void SceneryPager::queueRequest(const std::string& fileName, Group* group,
|
||||||
float priority, FrameStamp* frameStamp,
|
float priority, FrameStamp* frameStamp,
|
||||||
|
@ -81,6 +79,35 @@ void SceneryPager::queueDeleteRequest(osg::ref_ptr<osg::Object>& objptr)
|
||||||
_deleteRequests.push_back(objptr);
|
_deleteRequests.push_back(objptr);
|
||||||
objptr = 0;
|
objptr = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Work around interface change in
|
||||||
|
// osgDB::DatabasePager::requestNodeFile
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
struct NodePathProxy
|
||||||
|
{
|
||||||
|
NodePathProxy(NodePath& nodePath)
|
||||||
|
: _nodePath(nodePath)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
operator Group* () { return static_cast<Group*>(_nodePath.back()); }
|
||||||
|
operator NodePath& () { return _nodePath; }
|
||||||
|
NodePath& _nodePath;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
void SceneryPager::PagerRequest::doRequest(SceneryPager* pager)
|
||||||
|
{
|
||||||
|
if (_group->getNumChildren() == 0) {
|
||||||
|
NodePath path;
|
||||||
|
path.push_back(_group.get());
|
||||||
|
pager->requestNodeFile(_fileName, NodePathProxy(path), _priority,
|
||||||
|
_frameStamp.get(),
|
||||||
|
*_databaseRequest,
|
||||||
|
_options.get());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SceneryPager::signalEndFrame()
|
void SceneryPager::signalEndFrame()
|
||||||
{
|
{
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <osgDB/DatabasePager>
|
#include <osgDB/DatabasePager>
|
||||||
|
|
||||||
#include <simgear/structure/OSGVersion.hxx>
|
#include <simgear/structure/OSGVersion.hxx>
|
||||||
|
#include <simgear/scene/model/SGPagedLOD.hxx>
|
||||||
|
|
||||||
namespace flightgear
|
namespace flightgear
|
||||||
{
|
{
|
||||||
|
@ -39,16 +40,14 @@ public:
|
||||||
// Unhide DatabasePager::requestNodeFile
|
// Unhide DatabasePager::requestNodeFile
|
||||||
using osgDB::DatabasePager::requestNodeFile;
|
using osgDB::DatabasePager::requestNodeFile;
|
||||||
// reimplement to add readerWriterOptions from SGPagedLOD
|
// reimplement to add readerWriterOptions from SGPagedLOD
|
||||||
|
#if SG_PAGEDLOD_HAS_OPTIONS
|
||||||
|
#else
|
||||||
virtual void requestNodeFile(const std::string& fileName, osg::Group* group,
|
virtual void requestNodeFile(const std::string& fileName, osg::Group* group,
|
||||||
float priority,
|
float priority,
|
||||||
const osg::FrameStamp* framestamp,
|
const osg::FrameStamp* framestamp,
|
||||||
osg::ref_ptr<osg::Referenced>& databaseRequest,
|
osg::ref_ptr<osg::Referenced>& databaseRequest,
|
||||||
#if SG_OSG_MIN_VERSION_REQUIRED(2,9,5)
|
osgDB::ReaderWriter::Options* options);
|
||||||
const osg::Referenced* options
|
|
||||||
#else
|
|
||||||
osgDB::ReaderWriter::Options* options
|
|
||||||
#endif
|
#endif
|
||||||
);
|
|
||||||
void queueRequest(const std::string& fileName, osg::Group* node,
|
void queueRequest(const std::string& fileName, osg::Group* node,
|
||||||
float priority, osg::FrameStamp* frameStamp,
|
float priority, osg::FrameStamp* frameStamp,
|
||||||
osg::ref_ptr<osg::Referenced>& databaseRequest,
|
osg::ref_ptr<osg::Referenced>& databaseRequest,
|
||||||
|
@ -77,15 +76,7 @@ protected:
|
||||||
_databaseRequest(&databaseRequest)
|
_databaseRequest(&databaseRequest)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void doRequest(SceneryPager* pager)
|
void doRequest(SceneryPager* pager);
|
||||||
{
|
|
||||||
if (_group->getNumChildren() == 0)
|
|
||||||
pager->requestNodeFile(_fileName, _group.get(), _priority,
|
|
||||||
_frameStamp.get(),
|
|
||||||
*_databaseRequest,
|
|
||||||
_options.get());
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string _fileName;
|
std::string _fileName;
|
||||||
osg::ref_ptr<osg::Group> _group;
|
osg::ref_ptr<osg::Group> _group;
|
||||||
float _priority;
|
float _priority;
|
||||||
|
|
Loading…
Add table
Reference in a new issue