OSG 3.5.x support

This commit is contained in:
Richard Harrison
2017-03-30 03:58:27 +02:00
parent c170f576b6
commit 6f0c7da6ad
2 changed files with 24 additions and 6 deletions

View File

@@ -497,18 +497,31 @@ namespace canvas
{
case LEFT_TO_RIGHT:
{
osg::Vec2 delta( activefont->getKerning( previous_charcode,
charcode,
_kerningType ) );
#if OSG_VERSION_LESS_THAN(3,5,2)
osg::Vec2 delta(activefont->getKerning(previous_charcode,
charcode,
_kerningType));
#else
osg::Vec2 delta(activefont->getKerning(_fontSize,
previous_charcode,
charcode,
_kerningType));
#endif
cursor.x() += delta.x() * wr;
cursor.y() += delta.y() * hr;
break;
}
case RIGHT_TO_LEFT:
{
osg::Vec2 delta( activefont->getKerning( charcode,
previous_charcode,
_kerningType ) );
#if OSG_VERSION_LESS_THAN(3,5,2)
osg::Vec2 delta(activefont->getKerning(charcode,
previous_charcode,
_kerningType));
#else
osg::Vec2 delta(activefont->getKerning(_fontSize, charcode,
previous_charcode,
_kerningType));
#endif
cursor.x() -= delta.x() * wr;
cursor.y() -= delta.y() * hr;
break;

View File

@@ -415,7 +415,12 @@ public:
{
// XXX I understand why we want this, but this seems like a weird
// place to set this option.
#if OSG_VERSION_LESS_THAN(3,5,4)
//RJH - see OSG 11ddd53eb46d15903d036b594bfa3826d9e89393 -
// Removed redundent Referenced::s/getThreadSafeReferenceCounting() and associated static and env vars
// as there are now inapprorpiate and no longer supported
Referenced::setThreadSafeReferenceCounting(true);
#endif
Registry* registry = Registry::instance();
Options* options = new Options;