mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0029331: Visualization, TKOpenGl - make OpenGl_PrimitiveArray::IsFillDrawMode() as virtual method of OpenGl_Element
This commit is contained in:
parent
f47849f49e
commit
64c6d8df50
@ -228,7 +228,5 @@ Standard_Boolean OpenGl_CappingAlgoFilter::ShouldRender (const Handle(OpenGl_Wor
|
|||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
const OpenGl_PrimitiveArray* aPArray = dynamic_cast<const OpenGl_PrimitiveArray*> (theGlElement);
|
return theGlElement->IsFillDrawMode();
|
||||||
return aPArray != NULL
|
|
||||||
&& aPArray->IsFillDrawMode();
|
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,11 @@ public:
|
|||||||
theElement = NULL;
|
theElement = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//! Return TRUE if primitive type generates shaded triangulation (to be used in filters).
|
||||||
|
virtual Standard_Boolean IsFillDrawMode() const { return false; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Render element if it passes the filtering procedure. This method should
|
//! Render element if it passes the filtering procedure. This method should
|
||||||
|
@ -825,9 +825,7 @@ Standard_Boolean OpenGl_LayerList::OpenGl_OpaqueFilter::ShouldRender (const Hand
|
|||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
const OpenGl_PrimitiveArray* aPArray = dynamic_cast<const OpenGl_PrimitiveArray*> (theGlElement);
|
if (!theGlElement->IsFillDrawMode())
|
||||||
if (aPArray == NULL
|
|
||||||
|| !aPArray->IsFillDrawMode())
|
|
||||||
{
|
{
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
@ -856,9 +854,7 @@ Standard_Boolean OpenGl_LayerList::OpenGl_TransparentFilter::ShouldRender (const
|
|||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
const OpenGl_PrimitiveArray* aPArray = dynamic_cast<const OpenGl_PrimitiveArray*> (theGlElement);
|
if (!theGlElement->IsFillDrawMode())
|
||||||
if (aPArray == NULL
|
|
||||||
|| !aPArray->IsFillDrawMode())
|
|
||||||
{
|
{
|
||||||
return dynamic_cast<const OpenGl_AspectFace*> (theGlElement) != NULL;
|
return dynamic_cast<const OpenGl_AspectFace*> (theGlElement) != NULL;
|
||||||
}
|
}
|
||||||
|
@ -53,10 +53,10 @@ public:
|
|||||||
Standard_EXPORT virtual ~OpenGl_PrimitiveArray();
|
Standard_EXPORT virtual ~OpenGl_PrimitiveArray();
|
||||||
|
|
||||||
//! Render primitives to the window
|
//! Render primitives to the window
|
||||||
Standard_EXPORT virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const;
|
Standard_EXPORT virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Release OpenGL resources (VBOs)
|
//! Release OpenGL resources (VBOs)
|
||||||
Standard_EXPORT virtual void Release (OpenGl_Context* theContext);
|
Standard_EXPORT virtual void Release (OpenGl_Context* theContext) Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Return true if VBOs initialization has been performed.
|
//! Return true if VBOs initialization has been performed.
|
||||||
//! VBO initialization is performed during first Render() call.
|
//! VBO initialization is performed during first Render() call.
|
||||||
@ -70,7 +70,7 @@ public:
|
|||||||
GLint DrawMode() const { return myDrawMode; }
|
GLint DrawMode() const { return myDrawMode; }
|
||||||
|
|
||||||
//! Return TRUE if primitive type generates shaded triangulation.
|
//! Return TRUE if primitive type generates shaded triangulation.
|
||||||
Standard_Boolean IsFillDrawMode() const { return myIsFillType; }
|
virtual Standard_Boolean IsFillDrawMode() const Standard_OVERRIDE { return myIsFillType; }
|
||||||
|
|
||||||
//! @return indices array
|
//! @return indices array
|
||||||
const Handle(Graphic3d_IndexBuffer)& Indices() const { return myIndices; }
|
const Handle(Graphic3d_IndexBuffer)& Indices() const { return myIndices; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user