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_Aspects Class Reference

    The element holding Graphic3d_Aspects. More...

    #include <OpenGl_Aspects.hxx>

    Inheritance diagram for OpenGl_Aspects:

    Public Member Functions

     OpenGl_Aspects ()
     Empty constructor.
     OpenGl_Aspects (const occ::handle< Graphic3d_Aspects > &theAspect)
     Create and assign parameters.
    const occ::handle< Graphic3d_Aspects > & Aspect () const
     Return aspect.
    void SetAspect (const occ::handle< Graphic3d_Aspects > &theAspect)
     Assign parameters.
    Graphic3d_TypeOfShadingModel ShadingModel () const
     Returns Shading Model.
    void SetNoLighting ()
     Set if lighting should be disabled or not.
    const occ::handle< OpenGl_TextureSet > & TextureSet (const occ::handle< OpenGl_Context > &theCtx, bool theToHighlight=false) const
     Returns textures map.
    const occ::handle< OpenGl_ShaderProgram > & ShaderProgramRes (const occ::handle< OpenGl_Context > &theCtx) const
     Init and return OpenGl shader program resource.
    float MarkerSize () const
    bool HasPointSprite (const occ::handle< OpenGl_Context > &theCtx) const
     Return TRUE if OpenGl point sprite resource defines texture.
    bool IsDisplayListSprite (const occ::handle< OpenGl_Context > &theCtx) const
     Return TRUE if OpenGl point sprite resource defined by obsolete Display List (bitmap).
    const occ::handle< OpenGl_PointSprite > & SpriteRes (const occ::handle< OpenGl_Context > &theCtx, bool theIsAlphaSprite) const
     Init and return OpenGl point sprite resource.
    void Render (const occ::handle< OpenGl_Workspace > &theWorkspace) const override
    void Release (OpenGl_Context *theContext) override
     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.
    void SynchronizeAspects () override
     Update presentation aspects parameters after their modification.
    void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const override
     Dumps the content of me into the stream.
    Public Member Functions inherited from OpenGl_Element
     OpenGl_Element ()
    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.

    Protected Attributes

    OpenGl_AspectsProgram myResProgram
     OpenGl resources.
    OpenGl_AspectsTextureSet myResTextureSet
    OpenGl_AspectsSprite myResSprite
    occ::handle< Graphic3d_Aspects > myAspect
    Graphic3d_TypeOfShadingModel myShadingModel

    Additional Inherited Members

    Static Public Member Functions inherited from OpenGl_Element
    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 inherited from OpenGl_Element
    virtual ~OpenGl_Element ()

    Detailed Description

    The element holding Graphic3d_Aspects.

    Constructor & Destructor Documentation

    ◆ OpenGl_Aspects() [1/2]

    OpenGl_Aspects::OpenGl_Aspects ( )

    Empty constructor.

    ◆ OpenGl_Aspects() [2/2]

    OpenGl_Aspects::OpenGl_Aspects ( const occ::handle< Graphic3d_Aspects > & theAspect)

    Create and assign parameters.

    Member Function Documentation

    ◆ Aspect()

    const occ::handle< Graphic3d_Aspects > & OpenGl_Aspects::Aspect ( ) const
    inline

    Return aspect.

    ◆ DumpJson()

    void OpenGl_Aspects::DumpJson ( Standard_OStream & theOStream,
    int theDepth = -1 ) const
    overridevirtual

    Dumps the content of me into the stream.

    Reimplemented from OpenGl_Element.

    ◆ HasPointSprite()

    bool OpenGl_Aspects::HasPointSprite ( const occ::handle< OpenGl_Context > & theCtx) const
    inline

    Return TRUE if OpenGl point sprite resource defines texture.

    ◆ IsDisplayListSprite()

    bool OpenGl_Aspects::IsDisplayListSprite ( const occ::handle< OpenGl_Context > & theCtx) const
    inline

    Return TRUE if OpenGl point sprite resource defined by obsolete Display List (bitmap).

    ◆ MarkerSize()

    float OpenGl_Aspects::MarkerSize ( ) const
    inline
    Returns
    marker size

    ◆ Release()

    void OpenGl_Aspects::Release ( OpenGl_Context * theContext)
    overridevirtual

    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.

    Implements OpenGl_Element.

    ◆ Render()

    void OpenGl_Aspects::Render ( const occ::handle< OpenGl_Workspace > & theWorkspace) const
    overridevirtual

    Implements OpenGl_Element.

    ◆ SetAspect()

    void OpenGl_Aspects::SetAspect ( const occ::handle< Graphic3d_Aspects > & theAspect)

    Assign parameters.

    ◆ SetNoLighting()

    void OpenGl_Aspects::SetNoLighting ( )
    inline

    Set if lighting should be disabled or not.

    ◆ ShaderProgramRes()

    const occ::handle< OpenGl_ShaderProgram > & OpenGl_Aspects::ShaderProgramRes ( const occ::handle< OpenGl_Context > & theCtx) const
    inline

    Init and return OpenGl shader program resource.

    Returns
    shader program resource.

    ◆ ShadingModel()

    Graphic3d_TypeOfShadingModel OpenGl_Aspects::ShadingModel ( ) const
    inline

    Returns Shading Model.

    ◆ SpriteRes()

    const occ::handle< OpenGl_PointSprite > & OpenGl_Aspects::SpriteRes ( const occ::handle< OpenGl_Context > & theCtx,
    bool theIsAlphaSprite ) const
    inline

    Init and return OpenGl point sprite resource.

    Returns
    point sprite texture.

    ◆ SynchronizeAspects()

    void OpenGl_Aspects::SynchronizeAspects ( )
    inlineoverridevirtual

    Update presentation aspects parameters after their modification.

    Reimplemented from OpenGl_Element.

    ◆ TextureSet()

    const occ::handle< OpenGl_TextureSet > & OpenGl_Aspects::TextureSet ( const occ::handle< OpenGl_Context > & theCtx,
    bool theToHighlight = false ) const
    inline

    Returns textures map.

    Field Documentation

    ◆ myAspect

    occ::handle<Graphic3d_Aspects> OpenGl_Aspects::myAspect
    protected

    ◆ myResProgram

    OpenGl_AspectsProgram OpenGl_Aspects::myResProgram
    mutableprotected

    OpenGl resources.

    ◆ myResSprite

    OpenGl_AspectsSprite OpenGl_Aspects::myResSprite
    mutableprotected

    ◆ myResTextureSet

    OpenGl_AspectsTextureSet OpenGl_Aspects::myResTextureSet
    mutableprotected

    ◆ myShadingModel

    Graphic3d_TypeOfShadingModel OpenGl_Aspects::myShadingModel
    protected

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