Skip to content

Commit

Permalink
Unified the setup of version numbers so that they all are based on th…
Browse files Browse the repository at this point in the history
…e version

number setup in the include/osg/Version header file.
  • Loading branch information
robertosfield committed Apr 22, 2007
1 parent 4248c0f commit f242570
Show file tree
Hide file tree
Showing 12 changed files with 169 additions and 12 deletions.
2 changes: 1 addition & 1 deletion include/osg/Version
Expand Up @@ -19,7 +19,7 @@
extern "C" {

#define OSG_VERSION_MAJOR 1
#define OSG_VERSION_MINOR 2
#define OSG_VERSION_MINOR 9
#define OSG_VERSION_RELEASE 0
#define OSG_VERSION_REVISION 0

Expand Down
2 changes: 1 addition & 1 deletion src/osg/Geometry.cpp
Expand Up @@ -1164,7 +1164,7 @@ void Geometry::drawImplementation(RenderInfo& renderInfo) const
//std::cout << "none VertexBuffer path"<<std::endl;

//
// None Vertex Buffer Object path for defining vertex arrays.
// Non Vertex Buffer Object path for defining vertex arrays.
//
if( _vertexData.array.valid() )
state.setVertexPointer(_vertexData.array->getDataSize(),_vertexData.array->getDataType(),0,_vertexData.array->getDataPointer());
Expand Down
36 changes: 35 additions & 1 deletion src/osg/Version.cpp
Expand Up @@ -11,14 +11,48 @@
* OpenSceneGraph Public License for more details.
*/
#include <osg/Version>
#include <string>

extern "C" {

const char* osgGetVersion()
{
return "1.9";
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;
}


const char* osgGetLibraryName()
{
return "OpenSceneGraph Library";
}

}
7 changes: 6 additions & 1 deletion src/osgDB/Version.cpp
Expand Up @@ -11,14 +11,19 @@
* OpenSceneGraph Public License for more details.
*/
#include <osgDB/Version>
#include <osg/Version>

extern "C" {

const char* osgDBGetVersion()
{
return "1.9";
return osgGetVersion();
}


const char* osgDBGetLibraryName()
{
return "OpenSceneGraph DB (data base) Library";
}

}
20 changes: 19 additions & 1 deletion src/osgGA/Version.cpp
@@ -1,12 +1,30 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* 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.
*/

#include <osgGA/Version>
#include <osg/Version>

extern "C" {

const char* osgGAGetVersion()
{
return "1.9";
return osgGetVersion();
}


const char* osgGAGetLibraryName()
{
return "OpenSceneGraph Gui Adapter Library";
}

}
20 changes: 19 additions & 1 deletion src/osgParticle/Version.cpp
@@ -1,12 +1,30 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* 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.
*/

#include <osgParticle/Version>
#include <osg/Version>

extern "C" {

const char* osgParticleGetVersion()
{
return "1.9";
return osgGetVersion();
}


const char* osgParticleGetLibraryName()
{
return "OpenSceneGraph Particle Library";
}

}
20 changes: 19 additions & 1 deletion src/osgShadow/Version.cpp
@@ -1,12 +1,30 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* 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.
*/

#include <osgShadow/Version>
#include <osg/Version>

extern "C" {

const char* osgShadowGetVersion()
{
return "1.9";
return osgGetVersion();
}


const char* osgShaodowGetLibraryName()
{
return "OpenSceneGraph Shadow Library";
}

}
20 changes: 19 additions & 1 deletion src/osgSim/Version.cpp
@@ -1,12 +1,30 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* 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.
*/

#include <osgSim/Version>
#include <osg/Version>

extern "C" {

const char* osgSimGetVersion()
{
return "1.9";
return osgGetVersion();
}


const char* osgSimGetLibraryName()
{
return "OpenSceneGraph Visual Simulation Library";
}

}
20 changes: 19 additions & 1 deletion src/osgTerrain/Version.cpp
@@ -1,12 +1,30 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* 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.
*/

#include <osgTerrain/Version>
#include <osg/Version>

extern "C" {

const char* osgTerrainGetVersion()
{
return "1.9";
return osgGetVersion();
}


const char* osgTerrainGetLibraryName()
{
return "OpenSceneGraph Terrain Library";
}

}
20 changes: 19 additions & 1 deletion src/osgText/Version.cpp
@@ -1,12 +1,30 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* 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.
*/

#include <osgText/Version>
#include <osg/Version>

extern "C" {

const char* osgTextGetVersion()
{
return "1.9";
return osgGetVersion();
}


const char* osgTextGetLibraryName()
{
return "OpenSceneGraph Text Library";
}

}
7 changes: 6 additions & 1 deletion src/osgUtil/Version.cpp
Expand Up @@ -11,14 +11,19 @@
* OpenSceneGraph Public License for more details.
*/
#include <osgUtil/Version>
#include <osg/Version>

extern "C" {

const char* osgUtilGetVersion()
{
return "1.9";
return osgGetVersion();
}


const char* osgUtilGetLibraryName()
{
return "OpenSceneGraph Utility Library";
}

}
7 changes: 6 additions & 1 deletion src/osgViewer/Version.cpp
@@ -1,12 +1,17 @@
#include <osgViewer/Version>
#include <osg/Version>

extern "C" {

const char* osgViewerGetVersion()
{
return "1.9";
return osgGetVersion();
}


const char* osgViewerGetLibraryName()
{
return "OpenSceneGraph Viewer Library";
}

}

0 comments on commit f242570

Please sign in to comment.