OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    OpenGl_Element Class Referenceabstract

    Base interface for drawable elements. More...

    #include <OpenGl_Element.hxx>

    Inheritance diagram for OpenGl_Element:

    Public Member Functions

     OpenGl_Element ()
    virtual void Render (const occ::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.
    virtual bool IsFillDrawMode () const
     Return TRUE if primitive type generates shaded triangulation (to be used in filters).
    virtual size_t EstimatedDataSize () const
     Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules.
    virtual void UpdateMemStats (Graphic3d_FrameStatsDataTmp &theStats) const
     Increment memory usage statistics. Default implementation puts EstimatedDataSize() into Graphic3d_FrameStatsCounter_EstimatedBytesGeom.
    virtual void UpdateDrawStats (Graphic3d_FrameStatsDataTmp &theStats, bool theIsDetailed) const
     Increment draw calls statistics.
    virtual void SynchronizeAspects ()
     Update parameters of the drawable elements.
    virtual void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
     Dumps the content of me into the stream.

    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.

    Protected Member Functions

    virtual ~OpenGl_Element ()

    Detailed Description

    Base interface for drawable elements.

    Constructor & Destructor Documentation

    ◆ OpenGl_Element()

    OpenGl_Element::OpenGl_Element ( )

    ◆ ~OpenGl_Element()

    virtual OpenGl_Element::~OpenGl_Element ( )
    protectedvirtual

    Member Function Documentation

    ◆ Destroy()

    template<typename theResource_t>
    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.

    ◆ DumpJson()

    virtual void OpenGl_Element::DumpJson ( Standard_OStream & theOStream,
    int theDepth = -1 ) const
    virtual

    ◆ EstimatedDataSize()

    virtual size_t OpenGl_Element::EstimatedDataSize ( ) const
    inlinevirtual

    Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules.

    Reimplemented in OpenGl_PrimitiveArray, and OpenGl_Text.

    ◆ IsFillDrawMode()

    virtual bool OpenGl_Element::IsFillDrawMode ( ) const
    inlinevirtual

    Return TRUE if primitive type generates shaded triangulation (to be used in filters).

    Reimplemented in OpenGl_PrimitiveArray.

    ◆ Release()

    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_Aspects, OpenGl_Flipper, OpenGl_FrameStatsPrs, OpenGl_GraduatedTrihedron, OpenGl_PrimitiveArray, OpenGl_StencilTest, and OpenGl_Text.

    ◆ Render()

    ◆ SynchronizeAspects()

    virtual void OpenGl_Element::SynchronizeAspects ( )
    inlinevirtual

    Update parameters of the drawable elements.

    Reimplemented in OpenGl_Aspects.

    ◆ UpdateDrawStats()

    virtual void OpenGl_Element::UpdateDrawStats ( Graphic3d_FrameStatsDataTmp & theStats,
    bool theIsDetailed ) const
    virtual

    Increment draw calls statistics.

    Parameters
    [in]

    out] theStats frame counters to increment

    Parameters
    [in]theIsDetailedindicate detailed dump (more counters - number of triangles, points, etc.)

    Reimplemented in OpenGl_PrimitiveArray, and OpenGl_Text.

    ◆ UpdateMemStats()

    virtual void OpenGl_Element::UpdateMemStats ( Graphic3d_FrameStatsDataTmp & theStats) const
    virtual

    Increment memory usage statistics. Default implementation puts EstimatedDataSize() into Graphic3d_FrameStatsCounter_EstimatedBytesGeom.


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