mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +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;
|
||||
}
|
||||
|
||||
const OpenGl_PrimitiveArray* aPArray = dynamic_cast<const OpenGl_PrimitiveArray*> (theGlElement);
|
||||
return aPArray != NULL
|
||||
&& aPArray->IsFillDrawMode();
|
||||
return theGlElement->IsFillDrawMode();
|
||||
}
|
||||
|
@ -54,6 +54,11 @@ public:
|
||||
theElement = NULL;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
//! Return TRUE if primitive type generates shaded triangulation (to be used in filters).
|
||||
virtual Standard_Boolean IsFillDrawMode() const { return false; }
|
||||
|
||||
public:
|
||||
|
||||
//! 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;
|
||||
}
|
||||
|
||||
const OpenGl_PrimitiveArray* aPArray = dynamic_cast<const OpenGl_PrimitiveArray*> (theGlElement);
|
||||
if (aPArray == NULL
|
||||
|| !aPArray->IsFillDrawMode())
|
||||
if (!theGlElement->IsFillDrawMode())
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
@ -856,9 +854,7 @@ Standard_Boolean OpenGl_LayerList::OpenGl_TransparentFilter::ShouldRender (const
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
const OpenGl_PrimitiveArray* aPArray = dynamic_cast<const OpenGl_PrimitiveArray*> (theGlElement);
|
||||
if (aPArray == NULL
|
||||
|| !aPArray->IsFillDrawMode())
|
||||
if (!theGlElement->IsFillDrawMode())
|
||||
{
|
||||
return dynamic_cast<const OpenGl_AspectFace*> (theGlElement) != NULL;
|
||||
}
|
||||
|
@ -53,10 +53,10 @@ public:
|
||||
Standard_EXPORT virtual ~OpenGl_PrimitiveArray();
|
||||
|
||||
//! 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)
|
||||
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.
|
||||
//! VBO initialization is performed during first Render() call.
|
||||
@ -70,7 +70,7 @@ public:
|
||||
GLint DrawMode() const { return myDrawMode; }
|
||||
|
||||
//! 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
|
||||
const Handle(Graphic3d_IndexBuffer)& Indices() const { return myIndices; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user