Open CASCADE Technology  7.0.0
Public Member Functions | Static Public Member Functions | Protected Member Functions
OpenGl_Element Class Referenceabstract

Base interface for drawable elements. More...

#include <OpenGl_Element.hxx>

Inheritance diagram for OpenGl_Element:
Inheritance graph
[legend]

Public Member Functions

 OpenGl_Element ()
 
virtual void Render (const Handle< OpenGl_Workspace > &theWorkspace) const =0
 
virtual void Release (OpenGl_Context *theContext)=0
 Release GPU resources. Pointer to the context is used because this method might be called when the context is already being destroyed and usage of a handle would be unsafe. More...
 
Standard_Boolean RenderFiltered (const Handle< OpenGl_Workspace > &theWorkspace, const Handle< OpenGl_RenderFilter > &theFilter) const
 Render element if it passes the filtering procedure. This method should be used for elements which can be used in scope of rendering algorithms. E.g. elements of groups during recursive rendering. If render filter is null, pure rendering is performed. More...
 

Static Public Member Functions

template<typename theResource_t >
static void Destroy (OpenGl_Context *theContext, theResource_t *&theElement)
 Pointer to the context is used because this method might be called when the context is already being destroyed and usage of a handle would be unsafe. More...
 

Protected Member Functions

virtual ~OpenGl_Element ()
 

Detailed Description

Base interface for drawable elements.

Constructor & Destructor Documentation

OpenGl_Element::OpenGl_Element ( )
virtual OpenGl_Element::~OpenGl_Element ( )
protectedvirtual

Member Function Documentation

template<typename theResource_t >
static void OpenGl_Element::Destroy ( OpenGl_Context theContext,
theResource_t *&  theElement 
)
inlinestatic

Pointer to the context is used because this method might be called when the context is already being destroyed and usage of a handle would be unsafe.

virtual void OpenGl_Element::Release ( OpenGl_Context theContext)
pure virtual

Release GPU resources. Pointer to the context is used because this method might be called when the context is already being destroyed and usage of a handle would be unsafe.

Implemented in OpenGl_AspectFace, OpenGl_AspectText, OpenGl_AspectMarker, OpenGl_Text, OpenGl_PrimitiveArray, OpenGl_AspectLine, OpenGl_GraduatedTrihedron, OpenGl_Quadric, OpenGl_Trihedron, OpenGl_Flipper, and OpenGl_StencilTest.

virtual void OpenGl_Element::Render ( const Handle< OpenGl_Workspace > &  theWorkspace) const
pure virtual
Standard_Boolean OpenGl_Element::RenderFiltered ( const Handle< OpenGl_Workspace > &  theWorkspace,
const Handle< OpenGl_RenderFilter > &  theFilter 
) const
inline

Render element if it passes the filtering procedure. This method should be used for elements which can be used in scope of rendering algorithms. E.g. elements of groups during recursive rendering. If render filter is null, pure rendering is performed.

Parameters
theWorkspace[in] the rendering workspace.
theFilter[in] the rendering filter to check whether the element should be rendered or not.
Returns
True if element passes the filering check and is rendered.

The documentation for this class was generated from the following file: