Unified the setup of version numbers so that they all are based on the version

number setup in the include/osg/Version header file.
This commit is contained in:
Robert Osfield 2007-04-22 20:19:43 +00:00
parent 4248c0f8c8
commit f242570269
12 changed files with 169 additions and 12 deletions

View File

@ -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

View File

@ -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());

View File

@ -11,10 +11,42 @@
* 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;
}
@ -22,3 +54,5 @@ const char* osgGetLibraryName()
{
return "OpenSceneGraph Library";
}
}

View File

@ -11,10 +11,13 @@
* OpenSceneGraph Public License for more details.
*/
#include <osgDB/Version>
#include <osg/Version>
extern "C" {
const char* osgDBGetVersion()
{
return "1.9";
return osgGetVersion();
}
@ -22,3 +25,5 @@ const char* osgDBGetLibraryName()
{
return "OpenSceneGraph DB (data base) Library";
}
}

View File

@ -1,8 +1,24 @@
/* -*-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();
}
@ -10,3 +26,5 @@ const char* osgGAGetLibraryName()
{
return "OpenSceneGraph Gui Adapter Library";
}
}

View File

@ -1,8 +1,24 @@
/* -*-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();
}
@ -10,3 +26,5 @@ const char* osgParticleGetLibraryName()
{
return "OpenSceneGraph Particle Library";
}
}

View File

@ -1,8 +1,24 @@
/* -*-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();
}
@ -10,3 +26,5 @@ const char* osgShaodowGetLibraryName()
{
return "OpenSceneGraph Shadow Library";
}
}

View File

@ -1,8 +1,24 @@
/* -*-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();
}
@ -10,3 +26,5 @@ const char* osgSimGetLibraryName()
{
return "OpenSceneGraph Visual Simulation Library";
}
}

View File

@ -1,8 +1,24 @@
/* -*-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();
}
@ -10,3 +26,5 @@ const char* osgTerrainGetLibraryName()
{
return "OpenSceneGraph Terrain Library";
}
}

View File

@ -1,8 +1,24 @@
/* -*-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();
}
@ -10,3 +26,5 @@ const char* osgTextGetLibraryName()
{
return "OpenSceneGraph Text Library";
}
}

View File

@ -11,10 +11,13 @@
* OpenSceneGraph Public License for more details.
*/
#include <osgUtil/Version>
#include <osg/Version>
extern "C" {
const char* osgUtilGetVersion()
{
return "1.9";
return osgGetVersion();
}
@ -22,3 +25,5 @@ const char* osgUtilGetLibraryName()
{
return "OpenSceneGraph Utility Library";
}
}

View File

@ -1,8 +1,11 @@
#include <osgViewer/Version>
#include <osg/Version>
extern "C" {
const char* osgViewerGetVersion()
{
return "1.9";
return osgGetVersion();
}
@ -10,3 +13,5 @@ const char* osgViewerGetLibraryName()
{
return "OpenSceneGraph Viewer Library";
}
}