| 
    Open CASCADE Technology 7.8.2.dev
    
   | 
 
Rendering workspace. Provides methods to render primitives and maintain GL state. More...
#include <OpenGl_Workspace.hxx>

Public Member Functions | |
| OpenGl_Workspace (OpenGl_View *theView, const Handle< OpenGl_Window > &theWindow) | |
| Constructor of rendering workspace.   | |
| virtual | ~OpenGl_Workspace () | 
| Destructor.   | |
| Standard_Boolean | Activate () | 
| Activate rendering context.   | |
| OpenGl_View * | View () const | 
| const Handle< OpenGl_Context > & | GetGlContext () | 
| Handle< OpenGl_FrameBuffer > | FBOCreate (const Standard_Integer theWidth, const Standard_Integer theHeight) | 
| void | FBORelease (Handle< OpenGl_FrameBuffer > &theFbo) | 
| Standard_Boolean | BufferDump (const Handle< OpenGl_FrameBuffer > &theFbo, Image_PixMap &theImage, const Graphic3d_BufferType &theBufferType) | 
| Standard_Integer | Width () const | 
| Standard_Integer | Height () const | 
| Standard_Boolean | SetUseZBuffer (const Standard_Boolean theToUse) | 
| Setup Z-buffer usage flag (without affecting GL state!). Returns previously set flag.   | |
| Standard_Boolean & | UseZBuffer () | 
| Standard_Boolean & | UseDepthWrite () | 
| Graphic3d_PolygonOffset | SetDefaultPolygonOffset (const Graphic3d_PolygonOffset &theOffset) | 
| Configure default polygon offset parameters. Return previous settings.   | |
| bool | ToAllowFaceCulling () const | 
| Return true if active group might activate face culling (e.g. primitives are closed).   | |
| bool | SetAllowFaceCulling (bool theToAllow) | 
| Allow or disallow face culling. This call does NOT affect current state of back face culling; ApplyAspectFace() should be called to update state.   | |
| bool | ToHighlight () const | 
| Return true if following structures should apply highlight color.   | |
| const Handle< Graphic3d_PresentationAttributes > & | HighlightStyle () const | 
| Return highlight style.   | |
| void | SetHighlightStyle (const Handle< Graphic3d_PresentationAttributes > &theStyle) | 
| Set highlight style.   | |
| const OpenGl_Vec4 & | EdgeColor () const | 
| Return edge color taking into account highlight flag.   | |
| const OpenGl_Vec4 & | InteriorColor () const | 
| Return Interior color taking into account highlight flag.   | |
| const OpenGl_Vec4 & | TextColor () const | 
| Return text color taking into account highlight flag.   | |
| const OpenGl_Vec4 & | TextSubtitleColor () const | 
| Return text Subtitle color taking into account highlight flag.   | |
| const OpenGl_Aspects * | Aspects () const | 
| Currently set aspects (can differ from applied).   | |
| const OpenGl_Aspects * | SetAspects (const OpenGl_Aspects *theAspect) | 
| Assign new aspects (will be applied within ApplyAspects()).   | |
| const Handle< OpenGl_TextureSet > & | TextureSet () const | 
| Return TextureSet from set Aspects or Environment texture.   | |
| const OpenGl_Aspects * | ApplyAspects (bool theToBindTextures=true) | 
| Apply aspects.   | |
| void | ResetAppliedAspect () | 
| Clear the applied aspect state to default values.   | |
| Standard_Integer | RenderFilter () const | 
| Get rendering filter.   | |
| void | SetRenderFilter (Standard_Integer theFilter) | 
| Set filter for restricting rendering of particular elements.   | |
| bool | ShouldRender (const OpenGl_Element *theElement, const OpenGl_Group *theGroup) | 
| Checks whether the element can be rendered or not.   | |
| Standard_Integer | NbSkippedTransparentElements () | 
| Return the number of skipped transparent elements within active OpenGl_RenderFilter_OpaqueOnly filter.   | |
| void | ResetSkippedCounter () | 
| Reset skipped transparent elements counter.   | |
| const OpenGl_Aspects & | NoneCulling () const | 
| Returns face aspect for none culling mode.   | |
| const OpenGl_Aspects & | FrontCulling () const | 
| Returns face aspect for front face culling mode.   | |
| void | SetEnvironmentTexture (const Handle< OpenGl_TextureSet > &theTexture) | 
| Sets a new environment texture.   | |
| const Handle< OpenGl_TextureSet > & | EnvironmentTexture () const | 
| Returns environment texture.   | |
| void | DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const | 
| Dumps the content of me into the stream.   | |
  Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor.   | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing.   | |
| Standard_Transient & | operator= (const Standard_Transient &) | 
| Assignment operator, needed to avoid copying reference counter.   | |
| virtual | ~Standard_Transient () | 
| Destructor must be virtual.   | |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const | 
| Returns a type descriptor about this object.   | |
| Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const | 
| Returns a true value if this is an instance of Type.   | |
| Standard_Boolean | IsInstance (const Standard_CString theTypeName) const | 
| Returns a true value if this is an instance of TypeName.   | |
| Standard_Boolean | IsKind (const opencascade::handle< Standard_Type > &theType) const | 
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.   | |
| Standard_Boolean | IsKind (const Standard_CString theTypeName) const | 
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.   | |
| Standard_Transient * | This () const | 
| Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.   | |
| Standard_Integer | GetRefCount () const noexcept | 
| Get the reference counter of this object.   | |
| void | IncrementRefCounter () noexcept | 
| Increments the reference counter of this object.   | |
| Standard_Integer | DecrementRefCounter () noexcept | 
| Decrements the reference counter of this object; returns the decremented value.   | |
| virtual void | Delete () const | 
| Memory deallocator for transient classes.   | |
Protected Attributes | |
protected fields  | |
| OpenGl_View * | myView | 
| Handle< OpenGl_Window > | myWindow | 
| Handle< OpenGl_Context > | myGlContext | 
| Standard_Boolean | myUseZBuffer | 
| Standard_Boolean | myUseDepthWrite | 
| OpenGl_Aspects | myNoneCulling | 
| OpenGl_Aspects | myFrontCulling | 
fields related to status  | |
| Standard_Integer | myNbSkippedTranspElems | 
| counter of skipped transparent elements for OpenGl_LayerList two rendering passes method   | |
| Standard_Integer | myRenderFilter | 
| active filter for skipping rendering of elements by some criteria (multiple render passes)   | |
| OpenGl_Aspects | myDefaultAspects | 
| counter of skipped transparent elements for OpenGl_LayerList two rendering passes method   | |
| const OpenGl_Aspects * | myAspectsSet | 
| counter of skipped transparent elements for OpenGl_LayerList two rendering passes method   | |
| Handle< Graphic3d_Aspects > | myAspectsApplied | 
| counter of skipped transparent elements for OpenGl_LayerList two rendering passes method   | |
| Handle< Graphic3d_PresentationAttributes > | myAspectFaceAppliedWithHL | 
| counter of skipped transparent elements for OpenGl_LayerList two rendering passes method   | |
| bool | myToAllowFaceCulling | 
| allow back face culling   | |
| Handle< Graphic3d_PresentationAttributes > | myHighlightStyle | 
| active highlight style   | |
| OpenGl_Aspects | myAspectFaceHl | 
| Hiddenline aspect.   | |
| Handle< OpenGl_TextureSet > | myEnvironmentTexture | 
| counter of skipped transparent elements for OpenGl_LayerList two rendering passes method   | |
Additional Inherited Members | |
  Public Types inherited from Standard_Transient | |
| typedef void | base_type | 
| Returns a type descriptor about this object.   | |
  Static Public Member Functions inherited from Standard_Transient | |
| static constexpr const char * | get_type_name () | 
| Returns a type descriptor about this object.   | |
| static const opencascade::handle< Standard_Type > & | get_type_descriptor () | 
| Returns type descriptor of Standard_Transient class.   | |
Rendering workspace. Provides methods to render primitives and maintain GL state.
| OpenGl_Workspace::OpenGl_Workspace | ( | OpenGl_View * | theView, | 
| const Handle< OpenGl_Window > & | theWindow | ||
| ) | 
Constructor of rendering workspace.
      
  | 
  inlinevirtual | 
Destructor.
| Standard_Boolean OpenGl_Workspace::Activate | ( | ) | 
Activate rendering context.
| const OpenGl_Aspects * OpenGl_Workspace::ApplyAspects | ( | bool | theToBindTextures = true | ) | 
Apply aspects.
| theToBindTextures | flag to bind texture set defined by applied aspect | 
      
  | 
  inline | 
Currently set aspects (can differ from applied).
| Standard_Boolean OpenGl_Workspace::BufferDump | ( | const Handle< OpenGl_FrameBuffer > & | theFbo, | 
| Image_PixMap & | theImage, | ||
| const Graphic3d_BufferType & | theBufferType | ||
| ) | 
| void OpenGl_Workspace::DumpJson | ( | Standard_OStream & | theOStream, | 
| Standard_Integer | theDepth = -1  | 
        ||
| ) | const | 
Dumps the content of me into the stream.
      
  | 
  inline | 
Return edge color taking into account highlight flag.
      
  | 
  inline | 
Returns environment texture.
| Handle< OpenGl_FrameBuffer > OpenGl_Workspace::FBOCreate | ( | const Standard_Integer | theWidth, | 
| const Standard_Integer | theHeight | ||
| ) | 
| void OpenGl_Workspace::FBORelease | ( | Handle< OpenGl_FrameBuffer > & | theFbo | ) | 
      
  | 
  inline | 
Returns face aspect for front face culling mode.
      
  | 
  inline | 
| Standard_Integer OpenGl_Workspace::Height | ( | ) | const | 
      
  | 
  inline | 
Return highlight style.
      
  | 
  inline | 
Return Interior color taking into account highlight flag.
      
  | 
  inline | 
Return the number of skipped transparent elements within active OpenGl_RenderFilter_OpaqueOnly filter.
      
  | 
  inline | 
Returns face aspect for none culling mode.
      
  | 
  inline | 
Get rendering filter.
| void OpenGl_Workspace::ResetAppliedAspect | ( | ) | 
Clear the applied aspect state to default values.
      
  | 
  inline | 
Reset skipped transparent elements counter.
Allow or disallow face culling. This call does NOT affect current state of back face culling; ApplyAspectFace() should be called to update state.
| const OpenGl_Aspects * OpenGl_Workspace::SetAspects | ( | const OpenGl_Aspects * | theAspect | ) | 
Assign new aspects (will be applied within ApplyAspects()).
| Graphic3d_PolygonOffset OpenGl_Workspace::SetDefaultPolygonOffset | ( | const Graphic3d_PolygonOffset & | theOffset | ) | 
Configure default polygon offset parameters. Return previous settings.
      
  | 
  inline | 
Sets a new environment texture.
      
  | 
  inline | 
Set highlight style.
      
  | 
  inline | 
Set filter for restricting rendering of particular elements.
      
  | 
  inline | 
Setup Z-buffer usage flag (without affecting GL state!). Returns previously set flag.
| bool OpenGl_Workspace::ShouldRender | ( | const OpenGl_Element * | theElement, | 
| const OpenGl_Group * | theGroup | ||
| ) | 
Checks whether the element can be rendered or not.
| theElement | [in] the element to check | 
| theGroup | [in] the group containing the element | 
      
  | 
  inline | 
Return text color taking into account highlight flag.
      
  | 
  inline | 
Return text Subtitle color taking into account highlight flag.
      
  | 
  inline | 
Return TextureSet from set Aspects or Environment texture.
      
  | 
  inline | 
Return true if active group might activate face culling (e.g. primitives are closed).
      
  | 
  inline | 
Return true if following structures should apply highlight color.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
| Standard_Integer OpenGl_Workspace::Width | ( | ) | const | 
      
  | 
  protected | 
counter of skipped transparent elements for OpenGl_LayerList two rendering passes method
      
  | 
  protected | 
Hiddenline aspect.
      
  | 
  protected | 
counter of skipped transparent elements for OpenGl_LayerList two rendering passes method
      
  | 
  protected | 
counter of skipped transparent elements for OpenGl_LayerList two rendering passes method
      
  | 
  protected | 
counter of skipped transparent elements for OpenGl_LayerList two rendering passes method
      
  | 
  protected | 
counter of skipped transparent elements for OpenGl_LayerList two rendering passes method
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
active highlight style
      
  | 
  protected | 
counter of skipped transparent elements for OpenGl_LayerList two rendering passes method
      
  | 
  protected | 
      
  | 
  protected | 
active filter for skipping rendering of elements by some criteria (multiple render passes)
      
  | 
  protected | 
allow back face culling
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected |