]> OCCT Git - occt-copy.git/commitdiff
rebase on CR0-OCCT730 (V7_3_0) CR0_MW_vrml3
authorsnn <snn@opencascade.com>
Thu, 23 Aug 2018 14:34:33 +0000 (17:34 +0300)
committersnn <snn@opencascade.com>
Thu, 23 Aug 2018 14:34:33 +0000 (17:34 +0300)
13 files changed:
src/BinMXCAFDoc/BinMXCAFDoc_AnimationDriver.cxx
src/BinMXCAFDoc/BinMXCAFDoc_AnimationDriver.hxx
src/BinMXCAFDoc/BinMXCAFDoc_AnimationToolDriver.cxx
src/BinMXCAFDoc/BinMXCAFDoc_AnimationToolDriver.hxx
src/Graphic3d/Graphic3d_Group.hxx
src/OpenGl/OpenGl_AspectFillCapping.hxx
src/OpenGl/OpenGl_CappingRenderer.cxx
src/OpenGl/OpenGl_Workspace.hxx
src/XCAFDoc/XCAFDoc_NotesTool.hxx
src/XmlMXCAFDoc/XmlMXCAFDoc_AnimationDriver.cxx
src/XmlMXCAFDoc/XmlMXCAFDoc_AnimationDriver.hxx
src/XmlMXCAFDoc/XmlMXCAFDoc_AnimationToolDriver.cxx
src/XmlMXCAFDoc/XmlMXCAFDoc_AnimationToolDriver.hxx

index 492f3e07b7b5ebaf8d9fb9b8773e60a4c54b9d66..5d3e976b9403e96e9c00066dc00e1eb5666a770f 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <BinMXCAFDoc_AnimationDriver.hxx>
 #include <BinObjMgt_Persistent.hxx>
-#include <CDM_MessageDriver.hxx>
+#include <Message_Messenger.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_HAsciiString.hxx>
 #include <TDF_Attribute.hxx>
@@ -56,7 +56,7 @@ static void putByteArray(BinObjMgt_Persistent& theTarget, const Handle(TColStd_H
 //purpose  : 
 //=======================================================================
 BinMXCAFDoc_AnimationDriver::BinMXCAFDoc_AnimationDriver
-  (const Handle(CDM_MessageDriver)& theMsgDriver)
+  (const Handle(Message_Messenger)& theMsgDriver)
 : BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_Animation)->Name())
 {
 }
@@ -80,7 +80,6 @@ Standard_Boolean BinMXCAFDoc_AnimationDriver::Paste(const BinObjMgt_Persistent&
                                                  BinObjMgt_RRelocationTable& /*theRelocTable*/) const 
 {
   Handle(XCAFDoc_Animation) anAtt = Handle(XCAFDoc_Animation)::DownCast(theTarget);
-  Standard_Real aDensity;
   TCollection_AsciiString aName;
   
   if (!(theSource >> aName))
index 0c3bd4cee49c7035c8f07a6dad79e0478dc74752..669bdf444f91bd3f83886a2bd138e19ddea1d7ea 100644 (file)
@@ -23,7 +23,7 @@
 #include <Standard_Boolean.hxx>
 #include <BinObjMgt_RRelocationTable.hxx>
 #include <BinObjMgt_SRelocationTable.hxx>
-class CDM_MessageDriver;
+class Message_Messenger;
 class TDF_Attribute;
 class BinObjMgt_Persistent;
 
@@ -38,7 +38,7 @@ class BinMXCAFDoc_AnimationDriver : public BinMDF_ADriver
 public:
 
   
-  Standard_EXPORT BinMXCAFDoc_AnimationDriver(const Handle(CDM_MessageDriver)& theMsgDriver);
+  Standard_EXPORT BinMXCAFDoc_AnimationDriver(const Handle(Message_Messenger)& theMsgDriver);
   
   Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
   
index 00afab34e58a372d80f7accb651a47eedefe1abb..7417545321760fc98c49cc05848e25035de8668a 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <BinMXCAFDoc_AnimationToolDriver.hxx>
 #include <BinObjMgt_Persistent.hxx>
-#include <CDM_MessageDriver.hxx>
+#include <Message_Messenger.hxx>
 #include <Standard_Type.hxx>
 #include <TDF_Attribute.hxx>
 #include <XCAFDoc_AnimationTool.hxx>
@@ -28,7 +28,7 @@ IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_AnimationToolDriver, BinMDF_ADriver)
 //purpose  : 
 //=======================================================================
 BinMXCAFDoc_AnimationToolDriver::BinMXCAFDoc_AnimationToolDriver
-  (const Handle(CDM_MessageDriver)& theMsgDriver)
+  (const Handle(Message_Messenger)& theMsgDriver)
   : BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_AnimationTool)->Name())
 {
 }
index 313955b303ce9f8a4392c11c91cde3ef79d6696c..8a533011a357fff7f2316661e28e8e69301133f0 100644 (file)
@@ -23,7 +23,7 @@
 #include <Standard_Boolean.hxx>
 #include <BinObjMgt_RRelocationTable.hxx>
 #include <BinObjMgt_SRelocationTable.hxx>
-class CDM_MessageDriver;
+class Message_Messenger;
 class TDF_Attribute;
 class BinObjMgt_Persistent;
 
@@ -36,7 +36,7 @@ class BinMXCAFDoc_AnimationToolDriver : public BinMDF_ADriver
 {
 public:
 
-  Standard_EXPORT BinMXCAFDoc_AnimationToolDriver(const Handle(CDM_MessageDriver)& theMsgDriver);
+  Standard_EXPORT BinMXCAFDoc_AnimationToolDriver(const Handle(Message_Messenger)& theMsgDriver);
 
   Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
 
index 0b63804174393c767705c6ad728d3ac5270c1fc2..02f5f0779e6eea96fc37e199d63276ed8bfff155 100644 (file)
@@ -75,10 +75,10 @@ class Graphic3d_ArrayOfPrimitives;
 //! with aspects and primitives and choose the group usage model beforehand out of application needs.
 //! Note that some Graphic3d_Group class virtual methods contain only base implementation
 //! that is extended by the descendant class in OpenGl package.
-class Graphic3d_Group : public MMgt_TShared
+class Graphic3d_Group : public Standard_Transient
 {
   friend class Graphic3d_Structure;
-  DEFINE_STANDARD_RTTIEXT(Graphic3d_Group,MMgt_TShared)
+  DEFINE_STANDARD_RTTIEXT(Graphic3d_Group, Standard_Transient)
 
 public:
 
index 07261676e0bce572a5476b66b6e31a5490a9f557..bf4438853dbf4823ccce9b01bc7a6b98de748853 100644 (file)
@@ -55,6 +55,9 @@ public:
   //! Returns the shading aspect for drawing hatch layer of a section.
   Standard_EXPORT const OpenGl_AspectFace* HatchingFaceAspect() const;
 
+  //! Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules.
+  Standard_Size EstimatedDataSize() const Standard_OVERRIDE{ return 0; }
+
 protected:
 
   Handle(Graphic3d_AspectFillCapping) myAspect;         //!< Section style settings from application's level.
index 9009e9989c811185e887d66807898338e8a3dee7..1d5ae2f7b007cf22837ddeb6cacf37e1b7c45a25 100644 (file)
@@ -68,6 +68,9 @@ namespace
     }
     OpenGl_Element* GlElement() const { return myGlElement; }
 
+    //! Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules.
+    Standard_Size EstimatedDataSize() const Standard_OVERRIDE { return 0; }
+
   private:
     OpenGl_Element* myGlElement;
 
@@ -203,7 +206,7 @@ void OpenGl_CappingRenderer::renderOne (const Handle(OpenGl_Workspace)&    theWo
     aContext->ShaderManager()->UpdateClippingState();
 
     glClear (GL_STENCIL_BUFFER_BIT);
-    glColorMask (GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
+    const bool aColorMaskBack = aContext->SetColorMask(false);
 
     // override aspects, disable culling
     theWorkspace->SetAspectFace (&theWorkspace->NoneCulling());
@@ -232,7 +235,7 @@ void OpenGl_CappingRenderer::renderOne (const Handle(OpenGl_Workspace)&    theWo
     aContext->ShaderManager()->UpdateClippingState();
 
     // render capping plane using the generated stencil mask
-    glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+    aContext->SetColorMask(aColorMaskBack);
     if (theWorkspace->UseDepthWrite())
     {
       glDepthMask (GL_TRUE);
@@ -298,7 +301,7 @@ void OpenGl_CappingRenderer::renderOne (const Handle(OpenGl_Workspace)&    theWo
           aViewScale = static_cast<Standard_ShortReal> (aViewDim.Y() / aContext->Viewport()[3]);
         }
 
-        aHatchScale = 1.0f / (aViewScale * anAspectHatching->TextureSet (aContext)->First()->SizeY());
+        aHatchScale = 1.0f / (aViewScale * anAspectHatching->TextureSet(aContext)->First()->SizeY());
       }
     }
 
@@ -440,8 +443,5 @@ Standard_Boolean OpenGl_CappingRenderFilter::ShouldRender (const Handle(OpenGl_W
     return Standard_False;
   }
 
-  const OpenGl_PrimitiveArray* aPArray = dynamic_cast<const OpenGl_PrimitiveArray*> (theGlElement);
-  return aPArray != NULL
-      && aPArray->DrawMode() >= OpenGl_PrimitiveArray::THE_FILLPRIM_FROM
-      && aPArray->DrawMode() <= OpenGl_PrimitiveArray::THE_FILLPRIM_TO;
+  return theGlElement->IsFillDrawMode();
 }
index 4a3e602471a3afe9b9ad13b612e7f442044da0ad..e84d928bccbf3c2eadd7c8539e785910700109f9 100644 (file)
 #define _OpenGl_Workspace_Header
 
 #include <Graphic3d_BufferType.hxx>
+#include <Graphic3d_PresentationAttributes.hxx>
 
 #include <OpenGl_AspectFace.hxx>
-#include <OpenGl_CappingAlgo.hxx>
+#include <OpenGl_AspectMarker.hxx>
+#include <OpenGl_AspectLine.hxx>
+#include <OpenGl_AspectText.hxx>
+#include <OpenGl_CappingRenderer.hxx>
 #include <OpenGl_FrameBuffer.hxx>
 #include <OpenGl_Material.hxx>
 #include <OpenGl_Matrix.hxx>
@@ -260,8 +264,17 @@ public:
   //! Returns face aspect for textured font rendering.
   const OpenGl_AspectFace& FontFaceAspect() const { return myFontFaceAspect; }
 
+  //! Sets and applies current polygon offset.
+  void SetPolygonOffset (const Graphic3d_PolygonOffset& theParams);
+
+  //! Returns currently applied polygon offset parameters.
+  const Graphic3d_PolygonOffset& AppliedPolygonOffset() { return myPolygonOffsetApplied; }
+
   //! Returns capping algorithm rendering filter.
-  const Handle(OpenGl_CappingAlgoFilter)& DefaultCappingAlgoFilter() const { return myDefaultCappingAlgoFilter; }
+  const Handle(OpenGl_CappingRenderFilter)& CappingRenderFilter() const
+  {
+    return myCappingRenderFilter;
+  }
 
   //! Returns face aspect for none culling mode.
   const OpenGl_AspectFace& NoneCulling() const { return myNoneCulling; }
@@ -282,7 +295,7 @@ protected: //! @name protected fields
   Handle(OpenGl_Context)           myGlContext;
   Standard_Boolean                 myUseZBuffer;
   Standard_Boolean                 myUseDepthWrite;
-  Handle(OpenGl_CappingAlgoFilter) myDefaultCappingAlgoFilter;
+  Handle(OpenGl_CappingRenderFilter) myCappingRenderFilter;
   OpenGl_AspectFace                myNoneCulling;
   OpenGl_AspectFace                myFrontCulling;
   OpenGl_AspectFace                myFontFaceAspect;
@@ -306,6 +319,8 @@ protected: //! @name fields related to status
 
   OpenGl_Matrix myModelViewMatrix; //!< Model matrix with applied structure transformations
 
+  Graphic3d_PolygonOffset myPolygonOffsetApplied; //!< currently applied polygon offset
+
   OpenGl_AspectFace myAspectFaceHl; //!< Hiddenline aspect
 
   Handle(OpenGl_TextureSet) myEnvironmentTexture;
index 29303da0b8844fe081d762ff0a8a826c5b79f575..7480d134fd19ace3c85d8537cba670896f1bc4f3 100644 (file)
@@ -127,10 +127,6 @@ public:
   //! \param [in] theItemId - assembly item ID.
   //! \return annotated item label if it is found, otherwise - null label.
   Standard_EXPORT TDF_Label FindAnnotatedItem(const XCAFDoc_AssemblyItemId& theItemId) const;
-  Standard_EXPORT TDF_Label FindAnnotatedItemAttr(const XCAFDoc_AssemblyItemId& theItemId,
-                                                  const Standard_GUID&          theGUID) const;
-  Standard_EXPORT TDF_Label FindAnnotatedItemSubshape(const XCAFDoc_AssemblyItemId& theItemId,
-                                                      Standard_Integer              theSubshapeIndex) const;
 
   //! Finds a label of the given labeled item in the annotated items hive.
   //! \param [in] theItemLabel - item label.
@@ -235,12 +231,6 @@ public:
   //! \return number of added labels.
   Standard_EXPORT Standard_Integer GetNotes(const XCAFDoc_AssemblyItemId& theItemId,
                                             TDF_LabelSequence&            theNoteLabels) const;
-  Standard_EXPORT Standard_Integer GetAttrNotes(const XCAFDoc_AssemblyItemId& theItemId,
-                                                const Standard_GUID&          theGUID,
-                                                TDF_LabelSequence&            theNoteLabels) const;
-  Standard_EXPORT Standard_Integer GetSubshapeNotes(const XCAFDoc_AssemblyItemId& theItemId,
-                                                    Standard_Integer              theSubshapeIndex,
-                                                    TDF_LabelSequence&            theNoteLabels) const;
 
   //! Gets all note labels of the labeled item.
   //! Notes linked to item's attributes aren't
@@ -295,12 +285,6 @@ public:
   //! \return a handle to the assembly reference attribute.
   Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNote(const TDF_Label&              theNoteLabel,
                                                           const XCAFDoc_AssemblyItemId& theItemId);
-  Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNoteToAttr(const TDF_Label&              theNoteLabel,
-                                                                const XCAFDoc_AssemblyItemId& theItemId,
-                                                                const Standard_GUID&          theGUID);
-  Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNoteToSubshape(const TDF_Label&              theNoteLabel,
-                                                                    const XCAFDoc_AssemblyItemId& theItemId,
-                                                                    Standard_Integer              theSubshapeIndex);
 
   //! Adds the given note to the labeled item.
   //! \param [in] theNoteLabel - note label.
index 99ba3fc242005f259b93796589a3a98cbf1cebe7..28a911dd359b225ce6adc4784f131e62c7ef9628 100644 (file)
@@ -14,7 +14,7 @@
 // commercial license or contractual agreement.
 
 
-#include <CDM_MessageDriver.hxx>
+#include <Message_Messenger.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_HAsciiString.hxx>
 #include <TColStd_HArray1OfByte.hxx>
@@ -37,7 +37,7 @@ IMPLEMENT_DOMSTRING(AnimationLastIdx, "animation_last_idx")
 //purpose  : Constructor
 //=======================================================================
 XmlMXCAFDoc_AnimationDriver::XmlMXCAFDoc_AnimationDriver
-  (const Handle(CDM_MessageDriver)& theMsgDriver)
+  (const Handle(Message_Messenger)& theMsgDriver)
 : XmlMDF_ADriver (theMsgDriver, "xcaf", "Animation")
 {}
 
@@ -85,8 +85,6 @@ Standard_Boolean XmlMXCAFDoc_AnimationDriver::Paste
     return Standard_False;
   Handle(TColStd_HArray1OfByte) anAnim = new TColStd_HArray1OfByte(anAnimFirstIdx, anAnimLastIdx);
   
-  const Standard_Integer aMaxSize = anImageLastIdx - anImageFirstIdx + anAnimLastIdx - anAnimFirstIdx + 2;
-  
   XmlObjMgt_DOMString aDataStr = XmlObjMgt::GetStringValue(theSource);
   Standard_SStream anSS(aDataStr.GetString());
   
index 1cdf3685e8f06273c407ccc8d1ae573b9758c127..7c23181c87cbe41ecaf93a71d7385504c0071c26 100644 (file)
@@ -23,7 +23,7 @@
 #include <Standard_Boolean.hxx>
 #include <XmlObjMgt_RRelocationTable.hxx>
 #include <XmlObjMgt_SRelocationTable.hxx>
-class CDM_MessageDriver;
+class Message_Messenger;
 class TDF_Attribute;
 class XmlObjMgt_Persistent;
 
@@ -38,7 +38,7 @@ class XmlMXCAFDoc_AnimationDriver : public XmlMDF_ADriver
 public:
 
   
-  Standard_EXPORT XmlMXCAFDoc_AnimationDriver(const Handle(CDM_MessageDriver)& theMessageDriver);
+  Standard_EXPORT XmlMXCAFDoc_AnimationDriver(const Handle(Message_Messenger)& theMessageDriver);
   
   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
   
index 5ee0e0b917861eb066fad32408596a461d9a655e..4dd5a9a2595284b586949d39532859a999211aa4 100644 (file)
@@ -13,7 +13,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-#include <CDM_MessageDriver.hxx>
+#include <Message_Messenger.hxx>
 #include <Standard_Type.hxx>
 #include <TDF_Attribute.hxx>
 #include <XCAFDoc_AnimationTool.hxx>
@@ -27,7 +27,7 @@ IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_AnimationToolDriver,XmlMDF_ADriver)
 //purpose  : 
 //=======================================================================
 XmlMXCAFDoc_AnimationToolDriver::XmlMXCAFDoc_AnimationToolDriver
-  (const Handle(CDM_MessageDriver)& theMsgDriver)
+  (const Handle(Message_Messenger)& theMsgDriver)
 : XmlMDF_ADriver (theMsgDriver, "xcaf", "AnimationTool")
 {
 }
index 731d34fcf4c7cd4d33dfe15785c65aab7a030758..2adf4ef4a9745b05ab85b23711b078408e9e647b 100644 (file)
@@ -23,7 +23,7 @@
 #include <Standard_Boolean.hxx>
 #include <XmlObjMgt_RRelocationTable.hxx>
 #include <XmlObjMgt_SRelocationTable.hxx>
-class CDM_MessageDriver;
+class Message_Messenger;
 class TDF_Attribute;
 class XmlObjMgt_Persistent;
 
@@ -38,7 +38,7 @@ class XmlMXCAFDoc_AnimationToolDriver : public XmlMDF_ADriver
 public:
 
 
-  Standard_EXPORT XmlMXCAFDoc_AnimationToolDriver(const Handle(CDM_MessageDriver)& theMsgDriver);
+  Standard_EXPORT XmlMXCAFDoc_AnimationToolDriver(const Handle(Message_Messenger)& theMsgDriver);
   
   Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;