root/OpenSceneGraph/trunk/src/osg/Version.cpp @ 13041

Revision 13041, 1.5 kB (checked in by robert, 2 years ago)

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version.  The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 * OpenSceneGraph Public License for more details.
12*/
13#include <osg/Version>
14#include <string>
15#include <stdio.h>
16
17extern "C" {
18
19const char* osgGetVersion()
20{
21    static char osg_version[256];
22    static int osg_version_init = 1;
23    if (osg_version_init)
24    {
25        if (OSG_VERSION_REVISION==0)
26        {
27            sprintf(osg_version,"%d.%d.%d",OSG_VERSION_MAJOR,OSG_VERSION_MINOR,OSG_VERSION_RELEASE);
28        }
29        else
30        {
31            sprintf(osg_version,"%d.%d.%d-%d",OSG_VERSION_MAJOR,OSG_VERSION_MINOR,OSG_VERSION_RELEASE,OSG_VERSION_REVISION);
32        }
33
34        osg_version_init = 0;
35    }
36
37    return osg_version;
38}
39
40const char* osgGetSOVersion()
41{
42    static char osg_soversion[32];
43    static int osg_soversion_init = 1;
44    if (osg_soversion_init)
45    {
46        sprintf(osg_soversion,"%d",OPENSCENEGRAPH_SOVERSION);
47        osg_soversion_init = 0;
48    }
49
50    return osg_soversion;
51}
52
53const char* osgGetLibraryName()
54{
55    return "OpenSceneGraph Library";
56}
57
58}
Note: See TracBrowser for help on using the browser.