Fidora wrote:
I don't see why getVersionString should include "Horde3D", I can only see disadvantages with it.
But please enlighten me if there are any reasons for this behavior.
The version string is meant to be human-readable, so not much reason leave it out (apart from localisation issues).
However, I do think we need a setup to detect versions at both compile time and run time, or we wont be able to account for differing versions very well. Something like this:
Code:
#define HORDE3D_MAJOR 1
#define HORDE3D_MINOR 0
#define HORDE3D_PATCH 0
struct Horde3d_version {
char major;
char minor;
char patch;
};
// fill out a version structure at compile time
#define HORDE3D_COMPILED_VERSION(version) { \
version.major = HORDE3D_MAJOR; \
version.minor = HORDE3D_MINOR; \
version.patch = HORDE3D_PATCH; \
}
// fill out a version structure at run time
void Horde3d::version(Horde3d_version &version) {
version.major = HORDE3D_MAJOR;
version.minor = HORDE3D_MINOR;
version.patch = HORDE3D_PATCH;
}
Which would allow us to make sure at run time that we are using the same version we were compiled against.
*note that this scheme is lifted pretty much verbatim from GNU