Ogre Version

Problems building or running the engine, queries about how to use features etc.
Post Reply
libolt
Halfling
Posts: 62
Joined: Wed Jan 19, 2005 4:48 am
x 1

Ogre Version

Post by libolt » Wed Jul 11, 2018 10:16 pm

While I am moving my code to Ogre 1.11 I still need compatability with 1.10. Does ogre have a preprocessor macro that defines the version number?
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3772
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 131
Contact:

Re: Ogre Version

Post by dark_sylinc » Wed Jul 11, 2018 10:19 pm

See these macros in OgreMain/include/OgrePrerequisites.h

Code: Select all

#define OGRE_VERSION_MAJOR
#define OGRE_VERSION_MINOR
#define OGRE_VERSION_PATCH
#define OGRE_VERSION_SUFFIX
#define OGRE_VERSION_NAME
#define OGRE_VERSION
Cheers
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 615
Joined: Sun Mar 30, 2014 2:51 pm
x 85
Contact:

Re: Ogre Version

Post by paroj » Wed Jul 11, 2018 11:28 pm

Code: Select all

#if (OGRE_VERSION < ((1 << 16) | (11 << 8) | 0))
// 1.10
# else
// 1.11
#endif
probably we should also provide a OGRE_VERSION_LESS macro with ogre...
0 x

Post Reply