Compare commits
7 Commits
next
...
version/2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe2fb8e6ae | ||
|
|
4793166abf | ||
|
|
4494eb061e | ||
|
|
8ed9e01c63 | ||
|
|
55fc86741b | ||
|
|
9c0cafb82c | ||
|
|
ede50bec49 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -21,5 +21,6 @@ CMakeCache.txt
|
||||
CPackConfig.cmake
|
||||
CPackSourceConfig.cmake
|
||||
cmake_uninstall.cmake
|
||||
CTestTestfile.cmake
|
||||
install_manifest.txt
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
|
||||
option(SIMGEAR_SHARED "Set to ON to build SimGear as a shared library/framework" OFF)
|
||||
option(SIMGEAR_HEADLESS "Set to ON to build SimGear with GUI/graphics support" OFF)
|
||||
option(JPEG_FACTORY "Enable JPEG-factory support" OFF)
|
||||
option(ENABLE_LIBSVN "Set to ON to build SimGear with libsvnclient support" OFF)
|
||||
option(ENABLE_LIBSVN "Set to ON to build SimGear with libsvnclient support" ON)
|
||||
|
||||
set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
|
||||
|
||||
@@ -71,11 +71,13 @@ endif()
|
||||
|
||||
if(ENABLE_LIBSVN)
|
||||
find_package(SvnClient)
|
||||
|
||||
|
||||
if(LIBSVN_FOUND)
|
||||
message(STATUS "libsvn found, enabling in SimGear")
|
||||
set(HAVE_SVN_CLIENT_H 1)
|
||||
set(HAVE_LIBSVN_CLIENT_1 1)
|
||||
else()
|
||||
message(STATUS "Missing libsvn, unable to enable SVN in SimGear")
|
||||
endif(LIBSVN_FOUND)
|
||||
endif(ENABLE_LIBSVN)
|
||||
|
||||
|
||||
@@ -22,27 +22,30 @@ else(HAVE_APR_CONFIG)
|
||||
message(STATUS "apr-1-config not found, implement manual search for APR")
|
||||
endif(HAVE_APR_CONFIG)
|
||||
|
||||
find_path(LIBSVN_INCLUDE_DIR svn_client.h
|
||||
HINTS
|
||||
$ENV{LIBSVN_DIR}
|
||||
PATH_SUFFIXES include/subversion-1
|
||||
PATHS
|
||||
/usr/local
|
||||
/usr
|
||||
/opt
|
||||
)
|
||||
if(HAVE_APR_CONFIG)
|
||||
find_path(LIBSVN_INCLUDE_DIR svn_client.h
|
||||
HINTS
|
||||
$ENV{LIBSVN_DIR}
|
||||
PATH_SUFFIXES include/subversion-1
|
||||
PATHS
|
||||
/usr/local
|
||||
/usr
|
||||
/opt
|
||||
)
|
||||
|
||||
check_library_exists(svn_client-1 svn_client_checkout "" HAVE_LIB_SVNCLIENT)
|
||||
check_library_exists(svn_subr-1 svn_cmdline_init "" HAVE_LIB_SVNSUBR)
|
||||
check_library_exists(svn_ra-1 svn_ra_initialize "" HAVE_LIB_SVNRA)
|
||||
check_library_exists(svn_client-1 svn_client_checkout "" HAVE_LIB_SVNCLIENT)
|
||||
check_library_exists(svn_subr-1 svn_cmdline_init "" HAVE_LIB_SVNSUBR)
|
||||
check_library_exists(svn_ra-1 svn_ra_initialize "" HAVE_LIB_SVNRA)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSVN DEFAULT_MSG
|
||||
HAVE_LIB_SVNSUBR
|
||||
HAVE_LIB_SVNCLIENT
|
||||
HAVE_LIB_SVNRA
|
||||
LIBSVN_INCLUDE_DIR)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSVN DEFAULT_MSG
|
||||
HAVE_LIB_SVNSUBR
|
||||
HAVE_LIB_SVNCLIENT
|
||||
HAVE_LIB_SVNRA
|
||||
LIBSVN_INCLUDE_DIR)
|
||||
|
||||
if(LIBSVN_FOUND)
|
||||
set(LIBSVN_LIBRARIES "svn_client-1" "svn_subr-1" "svn_ra-1" ${APR_LIBS})
|
||||
endif(LIBSVN_FOUND)
|
||||
endif(HAVE_APR_CONFIG)
|
||||
|
||||
if(LIBSVN_FOUND)
|
||||
set(LIBSVN_LIBRARIES "svn_client-1" "svn_subr-1" "svn_ra-1" ${APR_LIBS})
|
||||
endif(LIBSVN_FOUND)
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
private:
|
||||
static osg::Vec3 gravity;
|
||||
static osg::Vec3 wind;
|
||||
const SGPropertyNode* modelRoot;
|
||||
SGConstPropertyNode_ptr modelRoot;
|
||||
static SGConstPropertyNode_ptr enabledNode;
|
||||
static bool enabled;
|
||||
};
|
||||
|
||||
@@ -204,21 +204,26 @@ Effect* getLightEffect(float size, const Vec3& attenuation,
|
||||
Pass *combinedPass = clone(spritePass, CopyOp::SHALLOW_COPY);
|
||||
combinedPass->setAttributeAndModes(point);
|
||||
Effect* effect = new Effect;
|
||||
std::vector<std::string> combinedExtensions;
|
||||
combinedExtensions.push_back("GL_ARB_point_sprite");
|
||||
combinedExtensions.push_back("GL_ARB_point_parameters");
|
||||
Technique* combinedTniq = new Technique;
|
||||
combinedTniq->passes.push_back(combinedPass);
|
||||
combinedTniq->setGLExtensionsPred(2.0, combinedExtensions);
|
||||
effect->techniques.push_back(combinedTniq);
|
||||
std::vector<std::string> spriteExtensions;
|
||||
spriteExtensions.push_back(combinedExtensions.front());
|
||||
Technique* spriteTniq = new Technique;
|
||||
spriteTniq->passes.push_back(spritePass);
|
||||
spriteTniq->setGLExtensionsPred(2.0, spriteExtensions);
|
||||
effect->techniques.push_back(spriteTniq);
|
||||
std::vector<std::string> parameterExtensions;
|
||||
parameterExtensions.push_back(combinedExtensions.back());
|
||||
|
||||
if (SGSceneFeatures::instance()->getEnablePointSpriteLights())
|
||||
{
|
||||
std::vector<std::string> combinedExtensions;
|
||||
combinedExtensions.push_back("GL_ARB_point_sprite");
|
||||
combinedExtensions.push_back("GL_ARB_point_parameters");
|
||||
Technique* combinedTniq = new Technique;
|
||||
combinedTniq->passes.push_back(combinedPass);
|
||||
combinedTniq->setGLExtensionsPred(2.0, combinedExtensions);
|
||||
effect->techniques.push_back(combinedTniq);
|
||||
std::vector<std::string> spriteExtensions;
|
||||
spriteExtensions.push_back(combinedExtensions.front());
|
||||
Technique* spriteTniq = new Technique;
|
||||
spriteTniq->passes.push_back(spritePass);
|
||||
spriteTniq->setGLExtensionsPred(2.0, spriteExtensions);
|
||||
effect->techniques.push_back(spriteTniq);
|
||||
parameterExtensions.push_back(combinedExtensions.back());
|
||||
}
|
||||
|
||||
Technique* parameterTniq = new Technique;
|
||||
parameterTniq->passes.push_back(attenuationPass);
|
||||
parameterTniq->setGLExtensionsPred(1.4, parameterExtensions);
|
||||
|
||||
@@ -8,4 +8,15 @@ set(SOURCES
|
||||
terrasync.cxx
|
||||
)
|
||||
|
||||
if(LIBSVN_FOUND)
|
||||
add_definitions(${APR_CFLAGS})
|
||||
|
||||
IF(APPLE)
|
||||
set_property(SOURCE terrasync.cxx PROPERTY COMPILE_FLAGS "-iwithsysroot ${LIBSVN_INCLUDE_DIR}")
|
||||
ELSE()
|
||||
include_directories(${LIBSVN_INCLUDE_DIR})
|
||||
ENDIF(APPLE)
|
||||
|
||||
endif()
|
||||
|
||||
simgear_component(tsync scene/tsync "${SOURCES}" "${HEADERS}")
|
||||
|
||||
@@ -569,16 +569,18 @@ int SGTerraSync::SvnThread::svnClientSetup(void)
|
||||
// not supported under msvc 7.1 ( code inside svn_cmdline_init )
|
||||
if (svn_cmdline_init("terrasync", 0) != EXIT_SUCCESS)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
// revert locale setting
|
||||
setlocale(LC_ALL,"C");
|
||||
#else
|
||||
/* svn_cmdline_init configures the locale. Setup environment to ensure the
|
||||
* default "C" locale remains active, since fgfs isn't locale aware - especially
|
||||
* requires "." as decimal point in strings containing floating point varibales. */
|
||||
setenv("LC_ALL", "C", 1);
|
||||
|
||||
if (svn_cmdline_init("terrasync", stderr) != EXIT_SUCCESS)
|
||||
return EXIT_FAILURE;
|
||||
#endif
|
||||
/* Oh no! svn_cmdline_init configures the locale - affecting numeric output
|
||||
* formats (i.e. sprintf("%f", ...)). fgfs relies on "C" locale in many places
|
||||
* (including assumptions on required sprintf buffer sizes). Things go horribly
|
||||
* wrong when the locale is changed to anything else but "C". Might be enough to
|
||||
* revert LC_NUMERIC locale - but we'll do a complete revert for now...*/
|
||||
setlocale(LC_ALL,"C");
|
||||
|
||||
apr_pool_t *pool;
|
||||
apr_pool_create(&pool, NULL);
|
||||
|
||||
@@ -46,6 +46,10 @@ public:
|
||||
|
||||
void setEnablePointSpriteLights(bool enable)
|
||||
{ _pointSpriteLights = enable; }
|
||||
bool getEnablePointSpriteLights() const
|
||||
{
|
||||
return _pointSpriteLights;
|
||||
}
|
||||
bool getEnablePointSpriteLights(unsigned contextId) const
|
||||
{
|
||||
if (!_pointSpriteLights)
|
||||
|
||||
@@ -151,6 +151,7 @@
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_DAYLIGHT 1
|
||||
|
||||
#define GLUT_H <GL/glut.h>
|
||||
|
||||
|
||||
@@ -12,5 +12,8 @@
|
||||
#cmakedefine HAVE_ISNAN
|
||||
#cmakedefine HAVE_WINDOWS_H
|
||||
|
||||
#cmakedefine HAVE_SVN_CLIENT_H
|
||||
#cmakedefine HAVE_LIBSVN_CLIENT_1
|
||||
|
||||
// set if building headless (no OSG or OpenGL libs)
|
||||
#cmakedefine NO_OPENSCENEGRAPH_INTERFACE
|
||||
|
||||
@@ -538,7 +538,7 @@ time_t sgTimeGetGMT(int year, int month, int day, int hour, int min, int sec)
|
||||
if ( daylight > 0 ) {
|
||||
daylight = 1;
|
||||
} else if ( daylight < 0 ) {
|
||||
SG_LOG( SG_EVENT, FG_WARN,
|
||||
SG_LOG( SG_EVENT, SG_WARN,
|
||||
"OOOPS, problem in sg_time.cxx, no daylight savings info." );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user