Compare commits

...

7 Commits

Author SHA1 Message Date
ThorstenB
cfda390557 #658: avoid crash when Textures.high is missing
Don't resolve the empty file name, which would result in the fgdata
directory path (instead of a path to a file). Eventually this resulted in
a segfault, partly due to a bug in "osgDB::readImageFile", which reports
"success" when given a directory (instead of a file) path, though it
doesn't return a valid image object.
2012-02-11 09:54:53 +01:00
Olaf Flebbe
c41d504a29 disable annoying clang warning 2012-02-10 22:37:45 +01:00
ThorstenB
93c115fc5c Olaf Flebbe: Avoid infinite recursion in simgear::Dir::create
when using it with a relative path.
2012-02-10 22:36:24 +01:00
ThorstenB
b753646aaf Move JPEG dependency
Alas, JPEG_FACTORY is in SimGearScene, not SimGearCore...
2012-01-29 14:40:26 +01:00
ThorstenB
dd07ab0436 Correct dependency of shared simgear libraries with enabled JPEG_FACTORY. 2012-01-29 14:29:35 +01:00
Mathias Froehlich
73f9cd05cd Lower the compressed texture message for the release branch. 2012-01-19 07:38:33 +01:00
Mathias Froehlich
0e4428fe79 Improve the compressed texture message. 2012-01-19 07:36:33 +01:00
5 changed files with 18 additions and 10 deletions

View File

@@ -221,6 +221,10 @@ if(WIN32)
set( RT_LIBRARY "winmm" )
endif(WIN32)
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
set (WARNING_FLAGS "-Wall -Wno-overloaded-virtual")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS} ${BOOST_CXX_FLAGS}")

View File

@@ -84,7 +84,8 @@ if(SIMGEAR_SHARED)
${ZLIB_LIBRARY}
${OPENSCENEGRAPH_LIBRARIES}
${OPENAL_LIBRARY} ${ALUT_LIBRARY}
${OPENGL_LIBRARY})
${OPENGL_LIBRARY}
${JPEG_LIBRARY})
if(LIBSVN_FOUND)
target_link_libraries(SimGearScene ${LIBSVN_LIBRARIES})

View File

@@ -265,7 +265,7 @@ bool Dir::create(mode_t mode)
// recursively create parent directories
Dir pr(parent());
if (!pr.exists()) {
if (!pr.path().isNull() && !pr.exists()) {
bool ok = pr.create(mode);
if (!ok) {
return false;

View File

@@ -216,11 +216,14 @@ TexTuple makeTexTuple(Effect* effect, const SGPropertyNode* props,
if (pImage)
{
imageName = pImage->getStringValue();
absFileName = SGModelLib::findDataFile(imageName, options);
if (absFileName.empty())
if (!imageName.empty())
{
SG_LOG(SG_INPUT, SG_ALERT, "Texture file not found: '"
<< imageName << "'");
absFileName = SGModelLib::findDataFile(imageName, options);
if (absFileName.empty())
{
SG_LOG(SG_INPUT, SG_ALERT, "Texture file not found: '"
<< imageName << "'");
}
}
}

View File

@@ -284,10 +284,10 @@ ModelRegistry::readImage(const string& fileName,
case GL_COMPRESSED_RED_GREEN_RGTC2_EXT:
case GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:
SG_LOG(SG_IO, SG_ALERT, "Image \"" << fileName
<< "\" contains non portable compressed textures.\n"
"Usage of these textures depend on an extension that"
" is not guaranteed to be present.");
SG_LOG(SG_IO, SG_WARN, "Image \"" << fileName << "\"\n"
"uses compressed textures which cannot be supported on "
"some systems.\n"
"Please decompress this texture for improved portability.");
break;
default: