From Bob Kuehne, fixes for OSX 10.4 build.
This commit is contained in:
parent
003329fd10
commit
2bb2d9bb37
@ -52,7 +52,7 @@ DynamicLibrary::~DynamicLibrary()
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
FreeLibrary((HMODULE)_handle);
|
||||
#elif defined(__APPLE__)
|
||||
NSUnLinkModule(_handle, FALSE);
|
||||
NSUnLinkModule(static_cast<__NSModule*>(_handle), FALSE);
|
||||
#elif defined(__hpux__)
|
||||
// fortunately, shl_t is a pointer
|
||||
shl_unload (static_cast<shl_t>(_handle));
|
||||
|
@ -2653,7 +2653,10 @@ void ConvertFromFLT::visitLightPoint(osg::Group& osgParent, LightPointRecord* re
|
||||
const DynGeoSet::ColorList& colors = dgset->getColorList();
|
||||
const DynGeoSet::NormalList& norms = dgset->getNormalList();
|
||||
|
||||
DPRINT(stderr, " Num Coords=%d, Num Colors=%d, Num Norms=%d\n", coords.size(), colors.size(), norms.size()) ;
|
||||
DPRINT(stderr, " Num Coords=%d, Num Colors=%d, Num Norms=%d\n",
|
||||
static_cast<int>(coords.size()),
|
||||
static_cast<int>(colors.size()),
|
||||
static_cast<int>(norms.size())) ;
|
||||
|
||||
bool directional = false;
|
||||
int numInternalLightPoints = 0; // Number of osgSim::LightPoint objects to add per OpenFlight light point vertex
|
||||
|
@ -34,7 +34,7 @@
|
||||
// The constructors of isockinet, osockinet and iosockinet are changed.
|
||||
|
||||
#include "sockinet.h"
|
||||
#if defined(__APPLE__)
|
||||
#if defined( __APPLE__ ) && ( __GNUC__ < 4 )
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
|
@ -64,7 +64,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#if defined(__APPLE__) || defined(WIN32) || defined (__sgi) || defined (__hpux)
|
||||
#if (defined(__APPLE__)&&(__GNUC__<4)) || defined(WIN32) || defined (__sgi) || defined (__hpux)
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
|
@ -148,7 +148,7 @@ class OSGA_Archive : public osgDB::Archive
|
||||
char* _data;
|
||||
};
|
||||
|
||||
public:
|
||||
public:
|
||||
/** Functor used in internal implementations.*/
|
||||
struct ReadFunctor
|
||||
{
|
||||
|
@ -344,7 +344,11 @@ FSSpec *darwinPathToFSSpec (char *fname ) {
|
||||
FSRef ref;
|
||||
|
||||
/* convert the POSIX path to an FSRef */
|
||||
#if defined( __APPLE__ ) && ( __GNUC__ > 3 )
|
||||
result = FSPathMakeRef( (UInt8*)fname, &ref, false); // fname is not a directory
|
||||
#else
|
||||
result = FSPathMakeRef(fname, &ref, false); // fname is not a directory
|
||||
#endif
|
||||
|
||||
if (result!=0) return NULL;
|
||||
|
||||
@ -365,11 +369,11 @@ LoadBufferFromDarwinPath ( const char *fname, long *origWidth, long *origHeight,
|
||||
long *buffDepth)
|
||||
{
|
||||
FSSpec *fs;
|
||||
sprintf ( errMess, "" );
|
||||
|
||||
fs=darwinPathToFSSpec ( const_cast<char*>( fname ) );
|
||||
|
||||
if (fs == NULL) {
|
||||
sprintf ( errMess, "error creating path from fsspec" );
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
|
@ -1169,7 +1169,7 @@ void* geomRead::Parse(trpgToken /*tok*/,trpgReadBuffer &buf)
|
||||
{
|
||||
geometry = new osg::Geometry;
|
||||
osg::DrawArrayLengths* dal = new osg::DrawArrayLengths(osg::PrimitiveSet::TRIANGLE_STRIP,0,numPrims);
|
||||
geom.GetPrimLengths(&(dal->front()));
|
||||
geom.GetPrimLengths(reinterpret_cast<int*>(&(dal->front())));
|
||||
geometry->addPrimitiveSet(dal);
|
||||
}
|
||||
break;
|
||||
@ -1177,7 +1177,7 @@ void* geomRead::Parse(trpgToken /*tok*/,trpgReadBuffer &buf)
|
||||
{
|
||||
geometry = new osg::Geometry;
|
||||
osg::DrawArrayLengths* dal = new osg::DrawArrayLengths(osg::PrimitiveSet::TRIANGLE_FAN,0,numPrims);
|
||||
geom.GetPrimLengths(&(dal->front()));
|
||||
geom.GetPrimLengths(reinterpret_cast<int*>(&(dal->front())));
|
||||
geometry->addPrimitiveSet(dal);
|
||||
|
||||
// Need to flip the fans coords.
|
||||
|
Loading…
Reference in New Issue
Block a user