Changeset 10173

Show
Ignore:
Timestamp:
05/11/09 13:08:16 (5 years ago)
Author:
robert
Message:

Added OSG_MIN_VERSION_REQUIRED, OSG_VERSION_LESS_THAN, OSG_VERSION_LESS_OR_EQUAL, OSG_VERSION_GREATER_THAN, OSG_VERSION_GREATER_OR_EQUAL macros to help out with management of feature usage in 3rd party libs and applications

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osg/Version

    r10077 r10173  
    2222#define OPENSCENEGRAPH_MAJOR_VERSION    2 
    2323#define OPENSCENEGRAPH_MINOR_VERSION    9 
    24 #define OPENSCENEGRAPH_PATCH_VERSION    4 
    25 #define OPENSCENEGRAPH_SOVERSION        59 
     24#define OPENSCENEGRAPH_PATCH_VERSION    5 
     25#define OPENSCENEGRAPH_SOVERSION        60 
     26 
     27/** convinience macro that can be used to decide whether a feature is present or not i.e. 
     28  * #if OSG_MIN_VERSION_REQUIRED(2,9,5) 
     29  *    your code here 
     30  * #endif 
     31  */  
     32#define OSG_MIN_VERSION_REQUIRED(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION>MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION>MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION>=PATCH)))) 
     33#define OSG_VERSION_LESS_THAN(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION<MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION<MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION<PATCH)))) 
     34#define OSG_VERSION_LESS_OR_EQUAL(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION<MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION<MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION<=PATCH)))) 
     35#define OSG_VERSION_GREATER_THAN(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION>MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION>MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION>PATCH)))) 
     36#define OSG_VERSION_GREATER_OR_EQUAL(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION>MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION>MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION>=PATCH)))) 
     37 
    2638 
    2739/**