What it says on the tin: a place to discuss proposed new features.
steven
Gnoll
Posts: 657 Joined: Mon Feb 28, 2005 1:53 pm
Location: Australia - Canberra (ex - Switzerland - Geneva)
Contact:
Quote
0
login to like this post
Post
by steven » Sat Aug 25, 2007 8:56 am
Hey
Could it be possible to add the method Root::getVersion() returning the ogre version?
Code: Select all
static const String& getVersion() { return mVersion; };
Even better if it could tell the build version : debug or release.
This would permit me to make diagnostic tests on tester machines ensuring that the correct version of ogre is installed.
Thanks
haffax
OGRE Retired Moderator
Posts: 4823 Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8
Contact:
Quote
0
login to like this post
Post
by haffax » Sat Aug 25, 2007 9:34 am
There are macros for this. OGRE_DEBUG_MODE is 1 if compiled in debug mode, 0 else, see OgrePlatform.h for details. OGRE_VERSION the combined version number (major, minor, patchlevel) See OgrePrerequisites.h for details.
Version string can be built this way:
Code: Select all
std::stringstream ss;
ss << "Ogre3D "
<< OGRE_VERSION_MAJOR << "."
<< OGRE_VERSION_MINOR << "."
<< OGRE_VERSION_PATCH
<< " (" << OGRE_VERSION_NAME ")";
steven
Gnoll
Posts: 657 Joined: Mon Feb 28, 2005 1:53 pm
Location: Australia - Canberra (ex - Switzerland - Geneva)
Contact:
Quote
0
login to like this post
Post
by steven » Sat Aug 25, 2007 12:15 pm
yes - I know
But I thought it was more elegant to have a get method.
And it doesn't tell me if its debug or release.
Also I need to import OgePrerequisites.h which I would prefer not.
As it has lots of #pragma that I would like to avoid in my code.
sinbad
OGRE Retired Team Member
Posts: 19269 Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:
Quote
0
login to like this post
Post
by sinbad » Sat Aug 25, 2007 12:17 pm
You've got OgrePrerequisites.h whether you know it or not. It's included in every single Ogre header file, the clue is in the name