From 59653bcc0899aa3a3ac77784758578acd66ceb0f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 8 May 2008 16:48:49 +0000 Subject: [PATCH] From Eric Sokolowsky, "I found one compilation error in OSG 2.4 in the Inventor plugin, where one node (SoTextureCoordinate3) was assumed to be available in all versions of Inventor but is actually only available in Coin. The use of the node is now protected by #ifdef __COIN__ constructs. The attachment is based on OSG 2.4, not SVN." --- src/osgPlugins/Inventor/ConvertToInventor.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/osgPlugins/Inventor/ConvertToInventor.cpp b/src/osgPlugins/Inventor/ConvertToInventor.cpp index 1df7ae34c..eb42fd247 100644 --- a/src/osgPlugins/Inventor/ConvertToInventor.cpp +++ b/src/osgPlugins/Inventor/ConvertToInventor.cpp @@ -67,13 +67,13 @@ #include #include #include -#include #include #include #include #include #include #ifdef __COIN__ +#include #include #include #endif @@ -1228,6 +1228,7 @@ static bool processPrimitiveSet(const osg::Geometry *g, const osg::PrimitiveSet startIndex, n); } } else +#ifdef __COIN__ if (ivTexCoords->isOfType(SoTextureCoordinate3::getClassTypeId())) { nonIndexedTexCoords = new SoTextureCoordinate3; if (ok) { @@ -1239,6 +1240,7 @@ static bool processPrimitiveSet(const osg::Geometry *g, const osg::PrimitiveSet startIndex, n); } } else +#endif // __COIN__ nonIndexedTexCoords = ivTexCoords; // create alternate normals @@ -1539,10 +1541,13 @@ void ConvertToInventor::processGeometry(const osg::Geometry *g, InventorState *i if (g->getTexCoordArray(0)->getDataSize() <= 2) { texCoords = new SoTextureCoordinate2; osgArray2ivMField(g->getTexCoordArray(0), ((SoTextureCoordinate2*)texCoords)->point); - } else { + } +#ifdef __COIN__ + else { texCoords = new SoTextureCoordinate3; osgArray2ivMField(g->getTexCoordArray(0), ((SoTextureCoordinate3*)texCoords)->point); } +#endif // __COIN__ } if (texCoords) texCoords->ref();