From be07f4888493b71f3d0c740b3f0be8c5cc35d0cd Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 26 Oct 2005 09:22:13 +0000 Subject: [PATCH] From Geoff Michel, compile fixes for VS6.0 --- include/osg/CullingSet | 16 ++++++++-------- include/osg/PrimitiveSet | 2 ++ .../osgProducer/GraphicsContextImplementation | 2 +- include/osgText/String | 2 ++ .../GraphicsContextImplementation.cpp | 2 +- src/osgUtil/DelaunayTriangulator.cpp | 10 +++++----- 6 files changed, 19 insertions(+), 15 deletions(-) diff --git a/include/osg/CullingSet b/include/osg/CullingSet index f217bcfc2..8d1a71231 100644 --- a/include/osg/CullingSet +++ b/include/osg/CullingSet @@ -102,18 +102,18 @@ class OSG_EXPORT CullingSet : public Referenced _frustum.setAndTransformProvidingInverse(cs._frustum,matrix); - for(StateFrustumList::iterator itr=_stateFrustumList.begin(); - itr!=_stateFrustumList.end(); - ++itr) + for(StateFrustumList::iterator sitr=_stateFrustumList.begin(); + sitr!=_stateFrustumList.end(); + ++sitr) { - itr->second.transformProvidingInverse(matrix); + sitr->second.transformProvidingInverse(matrix); } - for(OccluderList::iterator itr=_occluderList.begin(); - itr!=_occluderList.end(); - ++itr) + for(OccluderList::iterator oitr=_occluderList.begin(); + oitr!=_occluderList.end(); + ++oitr) { - itr->transformProvidingInverse(matrix); + oitr->transformProvidingInverse(matrix); } } diff --git a/include/osg/PrimitiveSet b/include/osg/PrimitiveSet index eb56dc850..9fdc7de85 100644 --- a/include/osg/PrimitiveSet +++ b/include/osg/PrimitiveSet @@ -73,6 +73,7 @@ public: // export template instances that are used as base classes #ifdef _MSC_VER +#if (_MSC_VER>1300) // VS6 doesnt need these template class __declspec(dllexport) std::allocator; template class __declspec(dllexport) std::vector >; template class __declspec(dllexport) std::allocator; @@ -82,6 +83,7 @@ template class __declspec(dllexport) std::vector; template class __declspec(dllexport) std::vector >; #endif +#endif class PrimitiveSet : public Object diff --git a/include/osgProducer/GraphicsContextImplementation b/include/osgProducer/GraphicsContextImplementation index 5a964df53..03f42b06d 100644 --- a/include/osgProducer/GraphicsContextImplementation +++ b/include/osgProducer/GraphicsContextImplementation @@ -57,7 +57,7 @@ class OSGPRODUCER_EXPORT GraphicsContextImplementation : public osg::GraphicsCon virtual void makeCurrentImplementation(); /** Make this graphics context current with specified read context.*/ - virtual void makeContextCurrentImplementation(GraphicsContext* readContext); + virtual void makeContextCurrentImplementation(osg::GraphicsContext* readContext); /** Bind the graphics context to associated texture.*/ virtual void bindPBufferToTextureImplementation(GLenum buffer); diff --git a/include/osgText/String b/include/osgText/String index 9bbd20981..6039fadf9 100644 --- a/include/osgText/String +++ b/include/osgText/String @@ -27,9 +27,11 @@ class Text; // export template instances that are used as base classes #ifdef _MSC_VER +#if (_MSC_VER>1300) template class __declspec(dllexport) std::allocator; template class __declspec(dllexport) std::vector >; #endif +#endif class OSGTEXT_EXPORT String : public osg::Referenced, public std::vector { diff --git a/src/osgProducer/GraphicsContextImplementation.cpp b/src/osgProducer/GraphicsContextImplementation.cpp index 0aef274f3..f04ceddc7 100644 --- a/src/osgProducer/GraphicsContextImplementation.cpp +++ b/src/osgProducer/GraphicsContextImplementation.cpp @@ -210,7 +210,7 @@ void GraphicsContextImplementation::makeCurrentImplementation() // _rs->makeCurrent(); } -void GraphicsContextImplementation::makeContextCurrentImplementation(GraphicsContext* readContext) +void GraphicsContextImplementation::makeContextCurrentImplementation(osg::GraphicsContext* readContext) { if (!_rs) return; diff --git a/src/osgUtil/DelaunayTriangulator.cpp b/src/osgUtil/DelaunayTriangulator.cpp index 178cb4acd..8762fdf93 100644 --- a/src/osgUtil/DelaunayTriangulator.cpp +++ b/src/osgUtil/DelaunayTriangulator.cpp @@ -261,7 +261,7 @@ public: return ip==a_ || ip==b_ || ip==c_; } - int lineBisectTest(const osg::Vec3 apt,const osg::Vec3 bpt,const osg::Vec3 cpt, const unsigned int ip1, const osg::Vec2 p2) const + int lineBisectTest(const osg::Vec3 apt,const osg::Vec3 bpt,const osg::Vec3 cpt, const osg::Vec2 p2) const { osg::Vec2 vp2tp=p2-osg::Vec2(apt.x(), apt.y()); // vector from p1 to a. // test is: cross product (z component) with ab,ac is opposite signs @@ -270,7 +270,7 @@ public: osg::Vec2 vecca=osg::Vec2(cpt.x(), cpt.y())-osg::Vec2(apt.x(), apt.y()); float cprodzba=vp2tp.x()*vecba.y() - vp2tp.y()*vecba.x(); float cprodzca=vp2tp.x()*vecca.y() - vp2tp.y()*vecca.x(); - // osg::notify(osg::WARN) << "linebisect test " << ip1 << " tri " << a_<<","<< b_<<","<< c_<