From Geoff Michel, compile fixes for VS6.0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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<GLsizei>;
|
||||
template class __declspec(dllexport) std::vector<GLsizei, std::allocator<GLsizei> >;
|
||||
template class __declspec(dllexport) std::allocator<GLubyte>;
|
||||
@@ -82,6 +83,7 @@ template class __declspec(dllexport) std::vector<GLushort, std::allocator<GLusho
|
||||
template class __declspec(dllexport) std::allocator<GLuint>;
|
||||
template class __declspec(dllexport) std::vector<GLuint, std::allocator<GLuint> >;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
class PrimitiveSet : public Object
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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<unsigned int>;
|
||||
template class __declspec(dllexport) std::vector<unsigned int, std::allocator<unsigned int> >;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class OSGTEXT_EXPORT String : public osg::Referenced, public std::vector<unsigned int>
|
||||
{
|
||||
|
||||
@@ -210,7 +210,7 @@ void GraphicsContextImplementation::makeCurrentImplementation()
|
||||
// _rs->makeCurrent();
|
||||
}
|
||||
|
||||
void GraphicsContextImplementation::makeContextCurrentImplementation(GraphicsContext* readContext)
|
||||
void GraphicsContextImplementation::makeContextCurrentImplementation(osg::GraphicsContext* readContext)
|
||||
{
|
||||
if (!_rs) return;
|
||||
|
||||
|
||||
@@ -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_<<std::endl;
|
||||
// osg::notify(osg::WARN) << "linebisect test " << " tri " << a_<<","<< b_<<","<< c_<<std::endl;
|
||||
if (cprodzba*cprodzca<0)
|
||||
{
|
||||
// more tests - check dot products are at least partly parallel to test line.
|
||||
@@ -295,7 +295,7 @@ public:
|
||||
osg::Vec3 apt=(*points)[a_];
|
||||
osg::Vec3 bpt=(*points)[b_];
|
||||
osg::Vec3 cpt=(*points)[c_];
|
||||
return lineBisectTest(apt,bpt,cpt,ip1,p2)?1:0;
|
||||
return lineBisectTest(apt,bpt,cpt,p2)?1:0;
|
||||
}
|
||||
else if (b_==ip1)
|
||||
{
|
||||
@@ -303,7 +303,7 @@ public:
|
||||
osg::Vec3 apt=(*points)[b_];
|
||||
osg::Vec3 bpt=(*points)[c_];
|
||||
osg::Vec3 cpt=(*points)[a_];
|
||||
return lineBisectTest(apt,bpt,cpt,ip1,p2)?2:0;
|
||||
return lineBisectTest(apt,bpt,cpt,p2)?2:0;
|
||||
}
|
||||
else if (c_==ip1)
|
||||
{
|
||||
@@ -311,7 +311,7 @@ public:
|
||||
osg::Vec3 apt=(*points)[c_];
|
||||
osg::Vec3 bpt=(*points)[a_];
|
||||
osg::Vec3 cpt=(*points)[b_];
|
||||
return lineBisectTest(apt,bpt,cpt,ip1,p2)?3:0;
|
||||
return lineBisectTest(apt,bpt,cpt,p2)?3:0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user