From 03af2ed7edae27a1f8665b7e584b2f91dccbdde2 Mon Sep 17 00:00:00 2001 From: bugmaster Date: Tue, 10 Nov 2015 14:16:22 +0300 Subject: [PATCH] Porting OCCT 6.9.1 on RedHat 9 --- src/BRepFill/BRepFill_Evolved.cxx | 7 +++++-- src/OpenGl/OpenGl_ShaderProgram.hxx | 2 +- src/OpenGl/OpenGl_Text.hxx | 6 +++--- src/OpenGl/OpenGl_View_Raytrace.cxx | 8 ++++---- src/SelectMgr/SelectMgr_RectangularFrustum.cxx | 6 ++++-- src/SelectMgr/SelectMgr_TriangularFrustum.cxx | 6 ++++-- src/math/math_PSOParticlesPool.cxx | 2 +- 7 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/BRepFill/BRepFill_Evolved.cxx b/src/BRepFill/BRepFill_Evolved.cxx index 642fbca5d4..3862f9467e 100644 --- a/src/BRepFill/BRepFill_Evolved.cxx +++ b/src/BRepFill/BRepFill_Evolved.cxx @@ -2224,8 +2224,11 @@ void BRepFill_Evolved::MakePipe(const TopoDS_Edge& SE, } #endif - BRepFill_Pipe Pipe(BRepLib_MakeWire(SE), GenProf); - //BRepFill_Pipe Pipe = BRepFill_Pipe(BRepLib_MakeWire(SE),GenProf); +TopoDS_Wire SW = BRepLib_MakeWire(SE); + BRepFill_Pipe Pipe(SW, GenProf); + +// BRepFill_Pipe Pipe(BRepLib_MakeWire(SE), GenProf); +// BRepFill_Pipe Pipe = BRepFill_Pipe(BRepLib_MakeWire(SE),GenProf); #ifdef DRAW if (AffichGeom) { diff --git a/src/OpenGl/OpenGl_ShaderProgram.hxx b/src/OpenGl/OpenGl_ShaderProgram.hxx index b9e58de279..f574ef5bc6 100755 --- a/src/OpenGl/OpenGl_ShaderProgram.hxx +++ b/src/OpenGl/OpenGl_ShaderProgram.hxx @@ -561,7 +561,7 @@ struct OpenGl_VariableSetter : public OpenGl_SetterInterface { theProgram->SetUniform (theCtx, theVariable->Name().ToCString(), - theVariable->Value()->As()); + theVariable->Value()->template As()); } }; diff --git a/src/OpenGl/OpenGl_Text.hxx b/src/OpenGl/OpenGl_Text.hxx index 68d8514a51..00fa7e9cf4 100755 --- a/src/OpenGl/OpenGl_Text.hxx +++ b/src/OpenGl/OpenGl_Text.hxx @@ -61,6 +61,9 @@ public: Standard_EXPORT virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const; Standard_EXPORT virtual void Release (OpenGl_Context* theContext); + //! Destructor + Standard_EXPORT virtual ~OpenGl_Text(); + public: //! @name methods for compatibility with layers //! Empty constructor @@ -98,9 +101,6 @@ public: //! @name methods for compatibility with layers protected: - //! Destructor - Standard_EXPORT virtual ~OpenGl_Text(); - friend class OpenGl_Trihedron; friend class OpenGl_GraduatedTrihedron; diff --git a/src/OpenGl/OpenGl_View_Raytrace.cxx b/src/OpenGl/OpenGl_View_Raytrace.cxx index 72eebcdc09..940dcbe545 100644 --- a/src/OpenGl/OpenGl_View_Raytrace.cxx +++ b/src/OpenGl/OpenGl_View_Raytrace.cxx @@ -1594,8 +1594,8 @@ void OpenGl_View::updateCamera (const OpenGl_Mat4& theOrientation, { for (Standard_Integer aX = -1; aX <= 1; aX += 2) { - OpenGl_Vec4 aOrigin (GLfloat(aX), - GLfloat(aY), + OpenGl_Vec4 aOrigin (static_cast(aX), + static_cast(aY), -1.0f, 1.0f); @@ -1605,8 +1605,8 @@ void OpenGl_View::updateCamera (const OpenGl_Mat4& theOrientation, aOrigin.y() = aOrigin.y() / aOrigin.w(); aOrigin.z() = aOrigin.z() / aOrigin.w(); - OpenGl_Vec4 aDirect (GLfloat(aX), - GLfloat(aY), + OpenGl_Vec4 aDirect (static_cast(aX), + static_cast(aY), 1.0f, 1.0f); diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx index bc8a4ade10..54faa30305 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx @@ -509,7 +509,8 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const Handle(TColgp_HAr } else if (theSensType == Select3D_TOS_INTERIOR) { - gp_Vec aPolyNorm (gp_XYZ (RealLast(), RealLast(), RealLast())); + //gp_Vec aPolyNorm (gp_XYZ (RealLast(), RealLast(), RealLast())); + gp_Vec aPolyNorm (RealLast(), RealLast(), RealLast()); if (!hasOverlap (theArrayOfPnts, aPolyNorm)) return Standard_False; @@ -545,7 +546,8 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1, } else if (theSensType == Select3D_TOS_INTERIOR) { - gp_Vec aTriangleNormal (gp_XYZ (RealLast(), RealLast(), RealLast())); + //gp_Vec aTriangleNormal (gp_XYZ (RealLast(), RealLast(), RealLast())); + gp_Vec aTriangleNormal (RealLast(), RealLast(), RealLast()); if (!hasOverlap (thePnt1, thePnt2, thePnt3, aTriangleNormal)) return Standard_False; diff --git a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx index a815a484f7..2711155ee6 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx @@ -230,7 +230,8 @@ Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const Handle(TColgp_HArr } else if (theSensType == Select3D_TOS_INTERIOR) { - gp_Vec aNorm (gp_XYZ (RealLast(), RealLast(), RealLast())); + //gp_Vec aNorm (gp_XYZ (RealLast(), RealLast(), RealLast())); + gp_Vec aNorm (RealLast(), RealLast(), RealLast()); return hasOverlap (theArrayOfPnts, aNorm); } @@ -271,7 +272,8 @@ Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const gp_Pnt& thePnt1, } else if (theSensType == Select3D_TOS_INTERIOR) { - gp_Vec aNorm (gp_XYZ (RealLast(), RealLast(), RealLast())); + //gp_Vec aNorm (gp_XYZ (RealLast(), RealLast(), RealLast())); + gp_Vec aNorm (RealLast(), RealLast(), RealLast()); return hasOverlap (thePnt1, thePnt2, thePnt3, aNorm); } diff --git a/src/math/math_PSOParticlesPool.cxx b/src/math/math_PSOParticlesPool.cxx index f3b7bf6ca6..80a7dd72f2 100644 --- a/src/math/math_PSOParticlesPool.cxx +++ b/src/math/math_PSOParticlesPool.cxx @@ -76,4 +76,4 @@ PSO_Particle* math_PSOParticlesPool::GetBestParticle() PSO_Particle* math_PSOParticlesPool::GetWorstParticle() { return &*std::max_element(myParticlesPool.begin(), myParticlesPool.end()); -} \ No newline at end of file +} -- 2.39.5