diff --git a/include/osg/Version b/include/osg/Version index 401f28928..762f1d080 100644 --- a/include/osg/Version +++ b/include/osg/Version @@ -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 diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index 6b5ddff06..1387d3762 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -1164,7 +1164,7 @@ void Geometry::drawImplementation(RenderInfo& renderInfo) const //std::cout << "none VertexBuffer path"<getDataSize(),_vertexData.array->getDataType(),0,_vertexData.array->getDataPointer()); diff --git a/src/osg/Version.cpp b/src/osg/Version.cpp index 4b3585292..20ebfecde 100644 --- a/src/osg/Version.cpp +++ b/src/osg/Version.cpp @@ -11,10 +11,42 @@ * OpenSceneGraph Public License for more details. */ #include +#include + +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"; } + +} diff --git a/src/osgDB/Version.cpp b/src/osgDB/Version.cpp index d46295128..c07b20d3b 100644 --- a/src/osgDB/Version.cpp +++ b/src/osgDB/Version.cpp @@ -11,10 +11,13 @@ * OpenSceneGraph Public License for more details. */ #include +#include + +extern "C" { const char* osgDBGetVersion() { - return "1.9"; + return osgGetVersion(); } @@ -22,3 +25,5 @@ const char* osgDBGetLibraryName() { return "OpenSceneGraph DB (data base) Library"; } + +} diff --git a/src/osgGA/Version.cpp b/src/osgGA/Version.cpp index cb404e5d5..7d8da9acd 100644 --- a/src/osgGA/Version.cpp +++ b/src/osgGA/Version.cpp @@ -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 +#include + +extern "C" { const char* osgGAGetVersion() { - return "1.9"; + return osgGetVersion(); } @@ -10,3 +26,5 @@ const char* osgGAGetLibraryName() { return "OpenSceneGraph Gui Adapter Library"; } + +} diff --git a/src/osgParticle/Version.cpp b/src/osgParticle/Version.cpp index 4048f69cf..a4fd5d425 100644 --- a/src/osgParticle/Version.cpp +++ b/src/osgParticle/Version.cpp @@ -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 +#include + +extern "C" { const char* osgParticleGetVersion() { - return "1.9"; + return osgGetVersion(); } @@ -10,3 +26,5 @@ const char* osgParticleGetLibraryName() { return "OpenSceneGraph Particle Library"; } + +} diff --git a/src/osgShadow/Version.cpp b/src/osgShadow/Version.cpp index 65df24357..d2f97bc4a 100644 --- a/src/osgShadow/Version.cpp +++ b/src/osgShadow/Version.cpp @@ -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 +#include + +extern "C" { const char* osgShadowGetVersion() { - return "1.9"; + return osgGetVersion(); } @@ -10,3 +26,5 @@ const char* osgShaodowGetLibraryName() { return "OpenSceneGraph Shadow Library"; } + +} diff --git a/src/osgSim/Version.cpp b/src/osgSim/Version.cpp index 6f270d212..3a27ef93f 100644 --- a/src/osgSim/Version.cpp +++ b/src/osgSim/Version.cpp @@ -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 +#include + +extern "C" { const char* osgSimGetVersion() { - return "1.9"; + return osgGetVersion(); } @@ -10,3 +26,5 @@ const char* osgSimGetLibraryName() { return "OpenSceneGraph Visual Simulation Library"; } + +} diff --git a/src/osgTerrain/Version.cpp b/src/osgTerrain/Version.cpp index 327441a38..87a791e13 100644 --- a/src/osgTerrain/Version.cpp +++ b/src/osgTerrain/Version.cpp @@ -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 +#include + +extern "C" { const char* osgTerrainGetVersion() { - return "1.9"; + return osgGetVersion(); } @@ -10,3 +26,5 @@ const char* osgTerrainGetLibraryName() { return "OpenSceneGraph Terrain Library"; } + +} diff --git a/src/osgText/Version.cpp b/src/osgText/Version.cpp index 54584c06b..8cf21011c 100644 --- a/src/osgText/Version.cpp +++ b/src/osgText/Version.cpp @@ -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 +#include + +extern "C" { const char* osgTextGetVersion() { - return "1.9"; + return osgGetVersion(); } @@ -10,3 +26,5 @@ const char* osgTextGetLibraryName() { return "OpenSceneGraph Text Library"; } + +} diff --git a/src/osgUtil/Version.cpp b/src/osgUtil/Version.cpp index 7fa41c37e..3aa670caa 100644 --- a/src/osgUtil/Version.cpp +++ b/src/osgUtil/Version.cpp @@ -11,10 +11,13 @@ * OpenSceneGraph Public License for more details. */ #include +#include + +extern "C" { const char* osgUtilGetVersion() { - return "1.9"; + return osgGetVersion(); } @@ -22,3 +25,5 @@ const char* osgUtilGetLibraryName() { return "OpenSceneGraph Utility Library"; } + +} diff --git a/src/osgViewer/Version.cpp b/src/osgViewer/Version.cpp index 8a6213a82..37dc6d9ad 100644 --- a/src/osgViewer/Version.cpp +++ b/src/osgViewer/Version.cpp @@ -1,8 +1,11 @@ #include +#include + +extern "C" { const char* osgViewerGetVersion() { - return "1.9"; + return osgGetVersion(); } @@ -10,3 +13,5 @@ const char* osgViewerGetLibraryName() { return "OpenSceneGraph Viewer Library"; } + +}