#include <simgear/canvas/Canvas.hxx>
#include <simgear/canvas/CanvasSystemAdapter.hxx>
#include <simgear/scene/util/parse_color.hxx>
-#include <simgear/structure/OSGVersion.hxx>
+#include <osg/Version>
#include <osgText/Text>
namespace simgear
if( !bb.valid() )
return bb;
-#if SG_OSG_VERSION_LESS_THAN(3,1,0)
+#if OSG_VERSION_LESS_THAN(3,1,0)
// TODO bounding box still doesn't seem always right (eg. with center
// horizontal alignment not completely accurate)
bb._min.y() += _offset.y();
#include "Effect.hxx"
#include "Technique.hxx"
+#include <osg/Version>
+
#include <osgUtil/CullVisitor>
#include <osgUtil/TangentSpaceGenerator>
int n = _effect->getGenerator(Effect::TANGENT);
tsg->generate(geometry, 0); // 0 is normal_unit, but I have no idea what that is!
if (n != -1 && !geometry->getVertexAttribArray(n))
- geometry->setVertexAttribArray(n, tsg->getTangentArray());
+#if OSG_MIN_VERSION_REQUIRED(3,1,8)
+ geometry->setVertexAttribArray(n, tsg->getTangentArray(), osg::Array::BIND_PER_VERTEX);
+#else
+ geometry->setVertexAttribData(n, osg::Geometry::ArrayData(tsg->getTangentArray(), osg::Geometry::BIND_PER_VERTEX,GL_FALSE));
+#endif
n = _effect->getGenerator(Effect::BINORMAL);
if (n != -1 && !geometry->getVertexAttribArray(n))
- geometry->setVertexAttribArray(n, tsg->getBinormalArray());
+#if OSG_MIN_VERSION_REQUIRED(3,1,8)
+ geometry->setVertexAttribArray(n, tsg->getBinormalArray(), osg::Array::BIND_PER_VERTEX);
+#else
+ geometry->setVertexAttribData(n, osg::Geometry::ArrayData(tsg->getBinormalArray(), osg::Geometry::BIND_PER_VERTEX,GL_FALSE));
+#endif
n = _effect->getGenerator(Effect::NORMAL);
if (n != -1 && !geometry->getVertexAttribArray(n))
- geometry->setVertexAttribArray(n, tsg->getNormalArray());
+#if OSG_MIN_VERSION_REQUIRED(3,1,8)
+ geometry->setVertexAttribArray(n, tsg->getNormalArray(), osg::Array::BIND_PER_VERTEX);
+#else
+ geometry->setVertexAttribData(n, osg::Geometry::ArrayData(tsg->getNormalArray(), osg::Geometry::BIND_PER_VERTEX,GL_FALSE));
+#endif
}
}