1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-13 14:27:08 +03:00

0024867: Visualization - polygon offsets look broken

If specific layer setting is not enabled, default value extracted from current OpenGl state will be used.
Default value fix.
Updated test case bugs/vis/bug24867
Linux warning fixed.
This commit is contained in:
duv
2014-05-08 11:39:02 +04:00
committed by bugmaster
parent 372ceec4ce
commit 550f3b8b22
9 changed files with 132 additions and 37 deletions

View File

@@ -34,6 +34,7 @@
#include <Aspect_CLayer2d.hxx>
#include <Aspect_Handle.hxx>
#include <Aspect_PrintAlgo.hxx>
#include <Aspect_PolygonOffsetMode.hxx>
#include <InterfaceGraphic_Graphic3d.hxx>
#include <InterfaceGraphic_Visual3d.hxx>
@@ -217,6 +218,12 @@ public:
//! @return applied model structure matrix.
inline const OpenGl_Matrix* ModelMatrix() const { return StructureMatrix_applied; }
//! Sets and applies current polygon offset.
void SetPolygonOffset (int theMode, Standard_ShortReal theFactor, Standard_ShortReal theUnits);
//! Returns currently applied polygon offset params.
const TEL_POFFSET_PARAM& AppliedPolygonOffset() { return PolygonOffset_applied; }
protected:
//! Copy content of Back buffer to the Front buffer
@@ -587,12 +594,11 @@ protected: //! @name fields related to status
OpenGl_Material myMatTmp; //!< temporary variable
TelCullMode myCullingMode; //!< back face culling mode, applied from face aspect
//! Model matrix with applied structure transformations
OpenGl_Matrix myModelViewMatrix;
OpenGl_Matrix myModelViewMatrix; //!< Model matrix with applied structure transformations
const TEL_POFFSET_PARAM* PolygonOffset_applied;
TEL_POFFSET_PARAM PolygonOffset_applied; //!< Currently applied polygon offset.
OpenGl_AspectFace myAspectFaceHl; // Hiddenline aspect
OpenGl_AspectFace myAspectFaceHl; //!< Hiddenline aspect
public: //! @name type definition