2006-07-18 23:21:48 +08:00
|
|
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
2003-01-22 00:45:36 +08:00
|
|
|
*
|
|
|
|
* This library is open source and may be redistributed and/or modified under
|
|
|
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
|
|
|
* (at your option) any later version. The full license is in LICENSE file
|
|
|
|
* included with this distribution, and on the openscenegraph.org website.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* OpenSceneGraph Public License for more details.
|
|
|
|
*/
|
2001-10-22 05:27:40 +08:00
|
|
|
#include <osg/Version>
|
2007-04-23 04:19:43 +08:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
extern "C" {
|
2001-01-11 00:32:10 +08:00
|
|
|
|
|
|
|
const char* osgGetVersion()
|
|
|
|
{
|
2007-04-23 04:19:43 +08:00
|
|
|
static char osg_version[256];
|
|
|
|
static int osg_version_init = 1;
|
|
|
|
if (osg_version_init)
|
|
|
|
{
|
|
|
|
if (OSG_VERSION_RELEASE==0)
|
|
|
|
{
|
|
|
|
if (OSG_VERSION_REVISION==0)
|
|
|
|
{
|
|
|
|
sprintf(osg_version,"%d.%d",OSG_VERSION_MAJOR,OSG_VERSION_MINOR);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
sprintf(osg_version,"%d.%d-%d",OSG_VERSION_MAJOR,OSG_VERSION_MINOR,OSG_VERSION_REVISION);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (OSG_VERSION_REVISION==0)
|
|
|
|
{
|
|
|
|
sprintf(osg_version,"%d.%d.%d",OSG_VERSION_MAJOR,OSG_VERSION_MINOR,OSG_VERSION_RELEASE);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
sprintf(osg_version,"%d.%d.%d-%d",OSG_VERSION_MAJOR,OSG_VERSION_MINOR,OSG_VERSION_RELEASE,OSG_VERSION_REVISION);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
osg_version_init = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return osg_version;
|
2001-01-11 00:32:10 +08:00
|
|
|
}
|
|
|
|
|
2001-09-20 05:08:56 +08:00
|
|
|
|
2001-01-11 00:32:10 +08:00
|
|
|
const char* osgGetLibraryName()
|
|
|
|
{
|
2004-09-27 20:07:34 +08:00
|
|
|
return "OpenSceneGraph Library";
|
2001-01-11 00:32:10 +08:00
|
|
|
}
|
2007-04-23 04:19:43 +08:00
|
|
|
|
|
|
|
}
|