Changeset 1019

Show
Ignore:
Timestamp:
11/20/07 04:02:48 (8 months ago)
Author:
PatrickDaehne
Message:

Made OSG2 compile on Mac OS X 10.5 Leopard

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/Base/Base/OSGBaseTypeTraits.h

    r862 r1019  
    13201320 
    13211321 
     1322#ifdef SIZE_T_NEQ_UINT32 
     1323 
     1324/*! \ingroup GrpBaseBaseBaseTypeTraits 
     1325 */ 
     1326 
     1327template <> 
     1328struct TypeTraits<size_t> : public TypeTraitsTemplateBase<size_t> 
     1329{ 
     1330    typedef       Real32                RealReturnType; 
     1331 
     1332 
     1333    static const  bool               IsPOD       = true; 
     1334    static const  MathTypeProperties MathProp    = IntValue; 
     1335 
     1336    static const  UInt32             BitsSet     = 0xFFFFFFFF; 
     1337    static const  UInt32             BitsClear   = 0x00000000; 
     1338 
     1339 
     1340    static        size_t             getZeroElement(void) 
     1341    { 
     1342        return 0; 
     1343    } 
     1344 
     1345    static        size_t             getOneElement (void) 
     1346    { 
     1347        return 1; 
     1348    } 
     1349 
     1350    static        size_t             getMax        (void)  
     1351    {  
     1352        return std::numeric_limits<size_t>::max(); 
     1353    } 
     1354 
     1355    static        size_t             getMin        (void) 
     1356    { 
     1357        return std::numeric_limits<size_t>::min(); 
     1358    } 
     1359 
     1360 
     1361    static size_t      getFromCString(const Char8 * pData, 
     1362                                            Char8 *&pDataEnd) 
     1363    { 
     1364        if(pData != NULL) 
     1365        { 
     1366            return size_t(strtoul(pData, &pDataEnd, 0)); 
     1367        } 
     1368        else 
     1369        { 
     1370            return getZeroElement(); 
     1371        } 
     1372    } 
     1373 
     1374 
     1375    static size_t      getFromCString(const Char8 *pData) 
     1376    { 
     1377        Char8 *pDataEnd; 
     1378 
     1379        return getFromCString(pData, pDataEnd); 
     1380    } 
     1381 
     1382 
     1383    static void putToString  (const size_t       val, 
     1384                                    std::string &out) 
     1385    { 
     1386        Char8 buffer[15]; 
     1387 
     1388        sprintf(buffer, "%u", val); 
     1389 
     1390        out.append(buffer); 
     1391    } 
     1392}; 
     1393 
     1394#endif 
     1395 
     1396 
    13221397#ifdef OSG_GLENUM_NEQ_UINT32 
    13231398 
  • trunk/Source/Base/Base/OSGConfig.h

    r997 r1019  
    641641# define OSG_NO_CONCEPT_CHECKS  
    642642# define SIZE_T_NEQ_UINT32 
    643 # define OSG_GLENUM_NEQ_UINT32 
     643# if (__APPLE_CC__ <= 5370) 
     644#  define OSG_GLENUM_NEQ_UINT32 
     645# endif 
    644646 
    645647# define OSG_USE_PTHREADS 
  • trunk/Source/Base/Base/OSGExceptionBinaryDataHandler.h

    r785 r1019  
    116116    void putValue  (const Real128      &value              ); 
    117117    void putValue  (const std::string  &value              ); 
    118 #ifdef __APPLE__ 
     118#ifdef OSG_GLENUM_NEQ_UINT32 
    119119    void putValue  (const GLenum       &value              ); 
    120120#endif 
     
    135135    void putValues (const Real128      *value, UInt32 size); 
    136136    void putValues (const std::string  *value, UInt32 size); 
    137 #ifdef __APPLE__ 
     137#ifdef OSG_GLENUM_NEQ_UINT32 
    138138    void putValues (const GLenum       *value, UInt32 size); 
    139139#endif 
     
    162162    void getValue   (Real128      &value             ) throw (ReadError); 
    163163    void getValue   (std::string  &value             ) throw (ReadError); 
    164 #ifdef __APPLE__ 
     164#ifdef OSG_GLENUM_NEQ_UINT32 
    165165    void getValue   (GLenum       &value             ) throw (ReadError); 
    166166#endif 
     
    181181    void getValues  (Real128      *value, UInt32 size) throw (ReadError); 
    182182    void getValues  (std::string  *value, UInt32 size) throw (ReadError); 
    183 #ifdef __APPLE__ 
     183#ifdef OSG_GLENUM_NEQ_UINT32 
    184184    void getValues  (GLenum       *value, UInt32 size) throw (ReadError); 
    185185#endif 
  • trunk/Source/Base/Base/OSGExceptionBinaryDataHandler.inl

    r785 r1019  
    179179} 
    180180 
    181 #ifdef __APPLE__ 
     181#ifdef OSG_GLENUM_NEQ_UINT32 
    182182inline  
    183183void ExceptionBinaryDataHandler::putValue(const GLenum &value) 
     
    430430} 
    431431 
    432 #ifdef __APPLE__ 
     432#ifdef OSG_GLENUM_NEQ_UINT32 
    433433inline  
    434434void ExceptionBinaryDataHandler::putValues(const GLenum *value, UInt32 size) 
     
    593593} 
    594594 
    595 #ifdef __APPLE__ 
     595#ifdef OSG_GLENUM_NEQ_UINT32 
    596596inline 
    597597void ExceptionBinaryDataHandler::getValue(GLenum &value) throw (ReadError) 
     
    827827} 
    828828 
    829 #ifdef __APPLE__ 
     829#ifdef OSG_GLENUM_NEQ_UINT32 
    830830inline  
    831831void ExceptionBinaryDataHandler::getValues(GLenum *value,  
  • trunk/Source/Base/Base/OSGGLU.h

    r785 r1019  
    6969#  endif 
    7070#elif defined(__APPLE__) 
    71 typedef GLvoid (*OSGGLUfuncptr)(...); 
     71# if (__APPLE_CC__ <= 5370) 
     72   typedef GLvoid (*OSGGLUfuncptr)(...); 
     73# else 
     74   typedef GLvoid (*OSGGLUfuncptr)(); 
     75# endif 
    7276#else 
    7377typedef void (*OSGGLUfuncptr)(); 
  • trunk/Source/WindowSystem/CoreGL/testWindowCoreGL.cpp

    r465 r1019  
    376376    }; 
    377377    CGLPixelFormatObj pixelFormatObj; 
    378     long numPixelFormats; 
     378    GLint numPixelFormats; 
    379379    CGLChoosePixelFormat(attribs, &pixelFormatObj, &numPixelFormats);  
    380380