From: Tim Moore Date: Mon, 20 Apr 2015 22:06:22 +0000 (+0200) Subject: Off-by-one error in the OSG_VERSION_LESS_THAN macro X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8b351520bd4499f9d8f0f281d8710345e293f9e1;p=simgear.git Off-by-one error in the OSG_VERSION_LESS_THAN macro I was confused about when the version number gets bumped in OSG sources... --- diff --git a/simgear/canvas/elements/CanvasText.cxx b/simgear/canvas/elements/CanvasText.cxx index ead600bd..0d108b1b 100644 --- a/simgear/canvas/elements/CanvasText.cxx +++ b/simgear/canvas/elements/CanvasText.cxx @@ -159,7 +159,7 @@ namespace canvas if( empty() ) return pos; -#if OSG_VERSION_LESS_THAN(3,3,4) +#if OSG_VERSION_LESS_THAN(3,3,5) GlyphQuads::Coords2 const& coords = _quads->_coords; #else GlyphQuads::Coords2 refCoords = _quads->_coords; @@ -198,7 +198,7 @@ namespace canvas return cursorPos(0); GlyphQuads::Glyphs const& glyphs = _quads->_glyphs; - #if OSG_VERSION_LESS_THAN(3,3,4) + #if OSG_VERSION_LESS_THAN(3,3,5) GlyphQuads::Coords2 const& coords = _quads->_coords; #else GlyphQuads::Coords2 refCoords = _quads->_coords; @@ -636,7 +636,7 @@ namespace canvas const GlyphQuads& quads = _textureGlyphQuadMap.begin()->second; const GlyphQuads::Glyphs& glyphs = quads._glyphs; -#if OSG_VERSION_LESS_THAN(3,3,4) +#if OSG_VERSION_LESS_THAN(3,3,5) GlyphQuads::Coords2 const& coords = quads._coords; #else GlyphQuads::Coords2 refCoords = quads._coords; diff --git a/simgear/scene/material/Technique.cxx b/simgear/scene/material/Technique.cxx index 96856cd1..c240391a 100644 --- a/simgear/scene/material/Technique.cxx +++ b/simgear/scene/material/Technique.cxx @@ -326,7 +326,7 @@ public: = GL2Extensions::Get(static_cast(contextId), true); if (!extensions) return; -#if OSG_VERSION_LESS_THAN(3,3,3) +#if OSG_VERSION_LESS_THAN(3,3,4) if (!extensions->isGlslSupported()) return; value = extensions->getLanguageVersion(); @@ -363,7 +363,7 @@ public: = GL2Extensions::Get(static_cast(contextId), true); if (!extensions) return; -#if OSG_VERSION_LESS_THAN(3,3,3) +#if OSG_VERSION_LESS_THAN(3,3,4) value = extensions->isGlslSupported(); #else value = extensions->isGlslSupported; diff --git a/simgear/scene/sky/CloudShaderGeometry.cxx b/simgear/scene/sky/CloudShaderGeometry.cxx index 7800839c..39a46ddd 100644 --- a/simgear/scene/sky/CloudShaderGeometry.cxx +++ b/simgear/scene/sky/CloudShaderGeometry.cxx @@ -128,7 +128,7 @@ void CloudShaderGeometry::drawImplementation(RenderInfo& renderInfo) const sortData.frameSorted = frameNumber; } -#if OSG_VERSION_LESS_THAN(3,3,3) +#if OSG_VERSION_LESS_THAN(3,3,4) const Extensions* extensions = getExtensions(state.getContextID(),true); #else const GLExtensions* extensions = GLExtensions::Get(state.getContextID(), true); diff --git a/simgear/scene/tgdb/ShaderGeometry.cxx b/simgear/scene/tgdb/ShaderGeometry.cxx index ac9ec937..cef28786 100644 --- a/simgear/scene/tgdb/ShaderGeometry.cxx +++ b/simgear/scene/tgdb/ShaderGeometry.cxx @@ -47,7 +47,7 @@ void ShaderGeometry::addObject(const Vec3& position, float scale, void ShaderGeometry::drawImplementation(osg::RenderInfo& renderInfo) const { State& state = *renderInfo.getState(); -#if OSG_VERSION_LESS_THAN(3,3,3) +#if OSG_VERSION_LESS_THAN(3,3,4) const Extensions* extensions = getExtensions(state.getContextID(), true); #else const GLExtensions* extensions = GLExtensions::Get(state.getContextID(), true); diff --git a/simgear/scene/util/SGSceneFeatures.cxx b/simgear/scene/util/SGSceneFeatures.cxx index 79f182f9..07b8dc48 100644 --- a/simgear/scene/util/SGSceneFeatures.cxx +++ b/simgear/scene/util/SGSceneFeatures.cxx @@ -86,7 +86,7 @@ SGSceneFeatures::setTextureCompression(osg::Texture* texture) const bool SGSceneFeatures::getHavePointSprites(unsigned contextId) const { -#if OSG_VERSION_LESS_THAN(3,3,3) +#if OSG_VERSION_LESS_THAN(3,3,4) return osg::PointSprite::isPointSpriteSupported(contextId); #else const osg::GLExtensions* ex = osg::GLExtensions::Get(contextId, true); @@ -97,7 +97,7 @@ SGSceneFeatures::getHavePointSprites(unsigned contextId) const bool SGSceneFeatures::getHaveFragmentPrograms(unsigned contextId) const { -#if OSG_VERSION_LESS_THAN(3,3,3) +#if OSG_VERSION_LESS_THAN(3,3,4) const osg::FragmentProgram::Extensions* fpe; fpe = osg::FragmentProgram::getExtensions(contextId, true); if (!fpe) @@ -115,7 +115,7 @@ SGSceneFeatures::getHaveFragmentPrograms(unsigned contextId) const bool SGSceneFeatures::getHaveVertexPrograms(unsigned contextId) const { -#if OSG_VERSION_LESS_THAN(3,3,3) +#if OSG_VERSION_LESS_THAN(3,3,4) const osg::VertexProgram::Extensions* vpe; vpe = osg::VertexProgram::getExtensions(contextId, true); if (!vpe) @@ -141,7 +141,7 @@ SGSceneFeatures::getHaveShaderPrograms(unsigned contextId) const bool SGSceneFeatures::getHavePointParameters(unsigned contextId) const { -#if OSG_VERSION_LESS_THAN(3,3,3) +#if OSG_VERSION_LESS_THAN(3,3,4) const osg::Point::Extensions* pe; pe = osg::Point::getExtensions(contextId, true); if (!pe)