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

    Implementation of OpenGl view. More...

    #include <OpenGl_View.hxx>

    Inheritance diagram for OpenGl_View:

    Data Structures

    class  ShaderSource
     Tool class for management of shader sources. More...
    struct  RaytracingParams
     Compile-time ray-tracing parameters. More...
    struct  StructState
     Describes state of OpenGL structure. More...

    Public Member Functions

     OpenGl_View (const occ::handle< Graphic3d_StructureManager > &theMgr, const occ::handle< OpenGl_GraphicDriver > &theDriver, const occ::handle< OpenGl_Caps > &theCaps, OpenGl_StateCounter *theCounter)
     Constructor.
     ~OpenGl_View () override
     Default destructor.
    virtual void ReleaseGlResources (const occ::handle< OpenGl_Context > &theCtx)
     Release OpenGL resources.
    void Remove () override
     Deletes and erases the view.
    bool SetImmediateModeDrawToFront (const bool theDrawToFrontBuffer) override
    void SetWindow (const occ::handle< Graphic3d_CView > &theParentVIew, const occ::handle< Aspect_Window > &theWindow, const Aspect_RenderingContext theContext) override
     Creates and maps rendering window to the view.
    occ::handle< Aspect_Window > Window () const override
     Returns window associated with the view.
    bool IsDefined () const override
     Returns True if the window associated to the view is defined.
    void Resized () override
     Handle changing size of the rendering window.
    void Redraw () override
     Redraw content of the view.
    void RedrawImmediate () override
     Redraw immediate content of the view.
    void Invalidate () override
     Marks BVH tree for given priority list as dirty and marks primitive set for rebuild.
    bool IsInvalidated () override
     Return true if view content cache has been invalidated.
    bool BufferDump (Image_PixMap &theImage, const Graphic3d_BufferType &theBufferType) override
     Dump active rendering buffer into specified memory buffer. In Ray-Tracing allow to get a raw HDR buffer using Graphic3d_BT_RGB_RayTraceHdrLeft buffer type, only Left view will be dumped ignoring stereoscopic parameter.
    bool ShadowMapDump (Image_PixMap &theImage, const TCollection_AsciiString &theLightName) override
     Dumps the graphical contents of a shadowmap framebuffer into an image.
    void InvalidateBVHData (const Graphic3d_ZLayerId theLayerId) override
     Marks BVH tree and the set of BVH primitives of correspondent priority list with id theLayerId as outdated.
    void InsertLayerBefore (const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings &theSettings, const Graphic3d_ZLayerId theLayerAfter) override
     Add a layer to the view.
    void InsertLayerAfter (const Graphic3d_ZLayerId theNewLayerId, const Graphic3d_ZLayerSettings &theSettings, const Graphic3d_ZLayerId theLayerBefore) override
     Add a layer to the view.
    void RemoveZLayer (const Graphic3d_ZLayerId theLayerId) override
     Remove a z layer with the given ID.
    void SetZLayerSettings (const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings &theSettings) override
     Sets the settings for a single Z layer of specified view.
    int ZLayerMax () const override
     Returns the maximum Z layer ID. First layer ID is Graphic3d_ZLayerId_Default, last ID is ZLayerMax().
    const NCollection_List< occ::handle< Graphic3d_Layer > > & Layers () const override
     Returns the list of layers.
    occ::handle< Graphic3d_Layer > Layer (const Graphic3d_ZLayerId theLayerId) const override
     Returns layer with given ID or NULL if undefined.
    Bnd_Box MinMaxValues (const bool theToIncludeAuxiliary) const override
     Returns the bounding box of all structures displayed in the view. If theToIncludeAuxiliary is TRUE, then the boundary box also includes minimum and maximum limits of graphical elements forming parts of infinite and other auxiliary structures.
    void ZFitAllBounds (Bnd_Box &thePrimaryBox, Bnd_Box &theGraphicBox) const override
     Return primary and graphical bounding boxes used by camera Z fitting.
    occ::handle< Standard_Transient > FBO () const override
     Returns pointer to an assigned framebuffer object.
    void SetFBO (const occ::handle< Standard_Transient > &theFbo) override
     Sets framebuffer object for offscreen rendering.
    occ::handle< Standard_Transient > FBOCreate (const int theWidth, const int theHeight) override
     Generate offscreen FBO in the graphic library. If not supported on hardware returns NULL.
    void FBORelease (occ::handle< Standard_Transient > &theFbo) override
     Remove offscreen FBO from the graphic library.
    void FBOGetDimensions (const occ::handle< Standard_Transient > &theFbo, int &theWidth, int &theHeight, int &theWidthMax, int &theHeightMax) override
     Read offscreen FBO configuration.
    void FBOChangeViewport (const occ::handle< Standard_Transient > &theFbo, const int theWidth, const int theHeight) override
     Change offscreen FBO viewport.
    const occ::handle< OpenGl_DepthPeeling > & DepthPeelingFbos () const
     Returns additional buffers for depth peeling OIT.
    Aspect_GradientBackground GradientBackground () const override
     Returns gradient background fill colors.
    void SetGradientBackground (const Aspect_GradientBackground &theBackground) override
     Sets gradient background fill colors.
    void SetBackgroundImage (const occ::handle< Graphic3d_TextureMap > &theTextureMap, bool theToUpdatePBREnv=true) override
     Sets image texture or environment cubemap as background.
    void SetTextureEnv (const occ::handle< Graphic3d_TextureEnv > &theTextureEnv) override
     Sets environment texture for the view.
    Aspect_FillMethod BackgroundImageStyle () const override
     Returns background image fill style.
    void SetBackgroundImageStyle (const Aspect_FillMethod theFillStyle) override
     Sets background image fill style.
    void SetImageBasedLighting (bool theToEnableIBL) override
     Enables or disables IBL (Image Based Lighting) from background cubemap. Has no effect if PBR is not used.
    void GridDisplay (const Aspect_GridParams &theParams, const gp_Ax3 &thePlane) override
     Display a shader-rendered grid on the given plane.
    void GridErase () override
     Erase the shader-rendered grid.
    bool ShaderGridEcho (const int theX, const int theY, Graphic3d_Vertex &thePoint) const override
     Return snapped point for the shader-rendered grid under the window pixel.
    bool ShaderGridEcho (const int theX, const int theY, Graphic3d_Vertex &thePoint, Graphic3d_Vertex &theDisplayPoint) const override
     Return snapped point and clip-safe display point for the shader-rendered grid echo marker.
    bool ShaderGridSnapPoint (const Graphic3d_Vertex &thePoint, Graphic3d_Vertex &theGridPoint) const override
     Return snapped point for the shader-rendered grid from an arbitrary world point.
    unsigned int SpecIBLMapLevels () const
     Returns number of mipmap levels used in specular IBL map. 0 if PBR environment is not created.
    const gp_XYZ & LocalOrigin () const
     Returns local camera origin currently set for rendering, might be modified during rendering.
    void SetLocalOrigin (const gp_XYZ &theOrigin)
     Setup local camera origin currently set for rendering.
    const occ::handle< Graphic3d_LightSet > & Lights () const override
     Returns list of lights of the view.
    void SetLights (const occ::handle< Graphic3d_LightSet > &theLights) override
     Sets list of lights for the view.
    const occ::handle< Graphic3d_SequenceOfHClipPlane > & ClipPlanes () const override
     Returns list of clip planes set for the view.
    void SetClipPlanes (const occ::handle< Graphic3d_SequenceOfHClipPlane > &thePlanes) override
     Sets list of clip planes for the view.
    void DiagnosticInformation (NCollection_IndexedDataMap< TCollection_AsciiString, TCollection_AsciiString > &theDict, Graphic3d_DiagnosticInfo theFlags) const override
     Fill in the dictionary with diagnostic info. Should be called within rendering thread.
    TCollection_AsciiString StatisticInformation () const override
     Returns string with statistic performance info.
    void StatisticInformation (NCollection_IndexedDataMap< TCollection_AsciiString, TCollection_AsciiString > &theDict) const override
     Fills in the dictionary with statistic performance info.
    const Quantity_ColorRGBA & BackgroundColor () const
     Returns background color.
    OpenGl_GraduatedTrihedron & ChangeGraduatedTrihedron ()
     Change graduated trihedron.
    void SetTextureEnv (const occ::handle< OpenGl_Context > &theCtx, const occ::handle< Graphic3d_TextureEnv > &theTexture)
    void SetBackgroundTextureStyle (const Aspect_FillMethod FillStyle)
    void SetBackgroundGradient (const Quantity_Color &AColor1, const Quantity_Color &AColor2, const Aspect_GradientFillMethod AType)
    void SetBackgroundGradientType (const Aspect_GradientFillMethod AType)
    const OpenGl_LayerList & LayerList () const
     Returns list of OpenGL Z-layers.
    const occ::handle< OpenGl_Window > & GlWindow () const
     Returns OpenGL window implementation.
    const occ::handle< OpenGl_TextureSet > & GlTextureEnv () const
     Returns OpenGL environment map.
    const Graphic3d_CullingTool & BVHTreeSelector () const
     Returns selector for BVH tree, providing a possibility to store information about current view volume and to detect which objects are overlapping it.
    bool HasImmediateStructures () const
     Returns true if there are immediate structures to display.
    obsolete Graduated Trihedron functionality

    Displays Graduated Trihedron.

    void GraduatedTrihedronDisplay (const Graphic3d_GraduatedTrihedron &theTrihedronData) override
     Erases Graduated Trihedron.
    void GraduatedTrihedronErase () override
     Erases Graduated Trihedron.
    void GraduatedTrihedronMinMaxValues (const NCollection_Vec3< float > theMin, const NCollection_Vec3< float > theMax) override
     Sets minimum and maximum points of scene bounding box for Graduated Trihedron stored in graphic view object.
    bool ToFlipOutput () const override
     Returns necessity to flip OY in projection matrix.
    void SetToFlipOutput (const bool theFlip) override
     Sets state of flip OY necessity in projection matrix.
    Public Member Functions inherited from Graphic3d_CView
     Graphic3d_CView (const occ::handle< Graphic3d_StructureManager > &theMgr)
     Constructor.
     ~Graphic3d_CView () override
     Destructor.
    int Identification () const
     Returns the identification number of the view.
    virtual void Activate ()
     Activates the view. Maps presentations defined within structure manager onto this view.
    virtual void Deactivate ()
     Deactivates the view. Unmaps presentations defined within structure manager. The view in deactivated state will ignore actions on structures such as Display().
    bool IsActive () const
     Returns the activity flag of the view.
    bool IsRemoved () const
     Returns true if the view was removed.
    const occ::handle< Graphic3d_Camera > & Camera () const override
     Returns camera object of the view.
    virtual void SetCamera (const occ::handle< Graphic3d_Camera > &theCamera)
     Sets camera used by the view.
    Graphic3d_TypeOfShadingModel ShadingModel () const
     Returns default Shading Model of the view; Graphic3d_TypeOfShadingModel_Phong by default.
    void SetShadingModel (Graphic3d_TypeOfShadingModel theModel)
     Sets default Shading Model of the view. Will throw an exception on attempt to set Graphic3d_TypeOfShadingModel_DEFAULT.
    Graphic3d_TypeOfBackfacingModel BackfacingModel () const
     Return backfacing model used for the view; Graphic3d_TypeOfBackfacingModel_Auto by default, which means that backface culling is defined by each presentation.
    void SetBackfacingModel (const Graphic3d_TypeOfBackfacingModel theModel)
     Sets backfacing model for the view.
    Graphic3d_TypeOfVisualization VisualizationType () const
     Returns visualization type of the view.
    void SetVisualizationType (const Graphic3d_TypeOfVisualization theType)
     Sets visualization type of the view.
    Graphic3d_ZLayerId ZLayerTarget () const
     Returns ZLayerId target.
    void SetZLayerTarget (const Graphic3d_ZLayerId theTarget)
     Sets ZLayerId target.
    bool ZLayerRedrawMode () const
     Returns ZLayerId redraw mode.
    void SetZLayerRedrawMode (const bool theMode)
     Sets ZLayerId redraw mode.
    void SetComputedMode (const bool theMode)
     Switches computed HLR mode in the view.
    bool ComputedMode () const
     Returns the computed HLR mode state.
    void ReCompute (const occ::handle< Graphic3d_Structure > &theStructure)
     Computes the new presentation of the structure displayed in this view with the type Graphic3d_TOS_COMPUTED.
    void Update (const Graphic3d_ZLayerId theLayerId=Graphic3d_ZLayerId_UNKNOWN)
     Invalidates bounding box of specified ZLayerId.
    void Compute ()
     Computes the new presentation of the structures displayed in this view with the type Graphic3d_TOS_COMPUTED.
    void DisplayedStructures (NCollection_Map< occ::handle< Graphic3d_Structure > > &theStructures) const
     Returns the set of structures displayed in this view.
    virtual int NumberOfDisplayedStructures () const
     Returns number of displayed structures in the view.
    bool IsComputed (const int theStructId, occ::handle< Graphic3d_Structure > &theComputedStruct) const
     Returns true in case if the structure with the given <theStructId> is in list of structures to be computed and stores computed struct to <theComputedStruct>.
    Bnd_Box MinMaxValues (const NCollection_Map< occ::handle< Graphic3d_Structure > > &theSet, const bool theToIncludeAuxiliary=false) const
     Returns the coordinates of the boundary box of all structures in the set <theSet>. If <theToIgnoreInfiniteFlag> is TRUE, then the boundary box also includes minimum and maximum limits of graphical elements forming parts of infinite structures.
    const occ::handle< Graphic3d_StructureManager > & StructureManager () const
     Returns the structure manager handle which manage structures associated with this view.
    virtual void InvalidateZLayerBoundingBox (const Graphic3d_ZLayerId theLayerId)
     Returns the bounding box of all structures displayed in the Z layer.
    double ConsiderZoomPersistenceObjects ()
     Returns zoom-scale factor.
    virtual void CopySettings (const occ::handle< Graphic3d_CView > &theOther)
     Copy visualization settings from another view. Method is used for cloning views in viewer when its required to create view with same view properties.
    const Graphic3d_RenderingParams & RenderingParams () const
     Returns current rendering parameters and effect settings.
    Graphic3d_RenderingParams & ChangeRenderingParams ()
     Returns reference to current rendering parameters and effect settings.
    virtual Aspect_Background Background () const
     Returns background fill color.
    virtual void SetBackground (const Aspect_Background &theBackground)
     Sets background fill color.
    const occ::handle< Graphic3d_TextureMap > & BackgroundImage ()
     Returns background image texture map.
    const occ::handle< Graphic3d_CubeMap > & BackgroundCubeMap () const
     Returns cubemap being set last time on background.
    const occ::handle< Graphic3d_CubeMap > & IBLCubeMap () const
     Returns cubemap being set last time on background.
    Graphic3d_TypeOfBackground BackgroundType () const
     Returns background type.
    void SetBackgroundType (Graphic3d_TypeOfBackground theType)
     Sets background type.
    const Aspect_SkydomeBackground & BackgroundSkydome () const
     Returns skydome aspect;.
    void SetBackgroundSkydome (const Aspect_SkydomeBackground &theAspect, bool theToUpdatePBREnv=true)
     Sets skydome aspect.
    const occ::handle< Graphic3d_TextureEnv > & TextureEnv () const
     Returns environment texture set for the view.
    double UnitFactor () const
     Return unit scale factor defined as scale factor for m (meters); 1.0 by default. Normally, view definition is unitless, however some operations like VR input requires proper units mapping.
    void SetUnitFactor (double theFactor)
     Set unit scale factor.
    const occ::handle< Aspect_XRSession > & XRSession () const
     Return XR session.
    void SetXRSession (const occ::handle< Aspect_XRSession > &theSession)
     Set XR session.
    bool IsActiveXR () const
     Return TRUE if there is active XR session.
    virtual bool InitXR ()
     Initialize XR session.
    virtual void ReleaseXR ()
     Release XR session.
    virtual void ProcessXRInput ()
     Process input.
    void SetupXRPosedCamera ()
     Compute PosedXRCamera() based on current XR head pose and make it active.
    void UnsetXRPosedCamera ()
     Set current camera back to BaseXRCamera() and copy temporary modifications of PosedXRCamera(). Calls SynchronizeXRPosedToBaseCamera() beforehand.
    const occ::handle< Graphic3d_Camera > & PosedXRCamera () const
     Returns transient XR camera position with tracked head orientation applied.
    void SetPosedXRCamera (const occ::handle< Graphic3d_Camera > &theCamera)
     Sets transient XR camera position with tracked head orientation applied.
    const occ::handle< Graphic3d_Camera > & BaseXRCamera () const
     Returns anchor camera definition (without tracked head orientation).
    void SetBaseXRCamera (const occ::handle< Graphic3d_Camera > &theCamera)
     Sets anchor camera definition.
    gp_Trsf PoseXRToWorld (const gp_Trsf &thePoseXR) const
     Convert XR pose to world space.
    gp_Ax1 ViewAxisInWorld (const gp_Trsf &thePoseXR) const
     Returns view direction in the world space based on XR pose.
    void SynchronizeXRBaseToPosedCamera ()
     Recomputes PosedXRCamera() based on BaseXRCamera() and head orientation.
    void SynchronizeXRPosedToBaseCamera ()
     Checks if PosedXRCamera() has been modified since SetupXRPosedCamera() and copies these modifications to BaseXRCamera().
    void ComputeXRPosedCameraFromBase (Graphic3d_Camera &theCam, const gp_Trsf &theXRTrsf) const
     Compute camera position based on XR pose.
    void ComputeXRBaseCameraFromPosed (const Graphic3d_Camera &theCamPosed, const gp_Trsf &thePoseTrsf)
     Update based camera from posed camera by applying reversed transformation.
    void TurnViewXRCamera (const gp_Trsf &theTrsfTurn)
     Turn XR camera direction using current (head) eye position as anchor.
    virtual const Graphic3d_GraduatedTrihedron & GetGraduatedTrihedron ()
     Displays Graduated Trihedron.
    void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const override
     Dumps the content of me into the stream.
    bool IsSubview () const
     list of child views
    Graphic3d_CView * ParentView ()
     Return parent View or NULL if this is not a subview.
    bool IsSubviewComposer () const
     Return TRUE if this is view performs rendering of subviews and nothing else; FALSE by default. By default, view with subviews will render main scene and blit subviews on top of it. Rendering of main scene might become redundant in case if subviews cover entire window of parent view. This flag allows to disable rendering of the main scene in such scenarios without creation of a dedicated V3d_Viewer instance just for composing subviews.
    void SetSubviewComposer (bool theIsComposer)
     Set if this view should perform composing of subviews and nothing else.
    const NCollection_Sequence< occ::handle< Graphic3d_CView > > & Subviews () const
     Return subview list.
    void AddSubview (const occ::handle< Graphic3d_CView > &theView)
     Add subview to the list.
    bool RemoveSubview (const Graphic3d_CView *theView)
     Remove subview from the list.
    Aspect_TypeOfTriedronPosition SubviewCorner () const
     Return subview position within parent view; Aspect_TOTP_LEFT_UPPER by default.
    void SetSubviewCorner (Aspect_TypeOfTriedronPosition thePos)
     Set subview position within parent view.
    const NCollection_Vec2< int > & SubviewTopLeft () const
     Return subview top-left position relative to parent view in pixels.
    bool IsSubViewRelativeSize () const
     Return TRUE if subview size is set as proportions relative to parent view.
    const NCollection_Vec2< double > & SubviewSize () const
     Return subview dimensions; (1.0, 1.0) by default. Values >= 2 define size in pixels; Values <= 1.0 define size as fraction of parent view.
    void SetSubviewSize (const NCollection_Vec2< double > &theSize)
     Set subview size relative to parent view.
    const NCollection_Vec2< double > & SubviewOffset () const
     Return corner offset within parent view; (0.0,0.0) by default. Values >= 2 define offset in pixels; Values <= 1.0 define offset as fraction of parent view dimensions.
    void SetSubviewOffset (const NCollection_Vec2< double > &theOffset)
     Set corner offset within parent view.
    const NCollection_Vec2< int > & SubviewMargins () const
     Return subview margins in pixels; (0,0) by default.
    void SetSubviewMargins (const NCollection_Vec2< int > &theMargins)
     Set subview margins in pixels.
    void SubviewResized (const occ::handle< Aspect_NeutralWindow > &theWindow)
     Update subview position and dimensions.
    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 ()=default
     Destructor must be virtual.
    virtual const opencascade::handle< Standard_Type > & DynamicType () const
     Returns a type descriptor about this object.
    bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
     Returns a true value if this is an instance of Type.
    bool IsInstance (const char *const theTypeName) const
     Returns a true value if this is an instance of TypeName.
    bool 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.
    bool IsKind (const char *const 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.
    int GetRefCount () const noexcept
     Get the reference counter of this object.
    void IncrementRefCounter () noexcept
     Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
    int DecrementRefCounter () noexcept
     Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
    virtual void Delete () const
     Memory deallocator for transient classes.

    Protected Member Functions

    Internal methods for managing GL resources

    Initializes OpenGl resource for environment texture.

    void initTextureEnv (const occ::handle< OpenGl_Context > &theContext)
    low-level redrawing sub-routines

    Prepare frame buffers for rendering.

    virtual bool prepareFrameBuffers (Graphic3d_Camera::Projection &theProj)
     Redraws view for the given monographic camera projection, or left/right eye.
    virtual void redraw (const Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, OpenGl_FrameBuffer *theOitAccumFbo)
     Redraws view for the given monographic camera projection, or left/right eye.
    virtual bool redrawImmediate (const Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadFbo, OpenGl_FrameBuffer *theDrawFbo, OpenGl_FrameBuffer *theOitAccumFbo, const bool theIsPartialUpdate=false)
     Redraws view for the given monographic camera projection, or left/right eye.
    bool blitSubviews (const Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theDrawFbo)
     Blit subviews into this view.
    bool blitBuffers (OpenGl_FrameBuffer *theReadFbo, OpenGl_FrameBuffer *theDrawFbo, const bool theToFlip=false)
     Blit image from/to specified buffers.
    void bindDefaultFbo (OpenGl_FrameBuffer *theCustomFbo=nullptr)
     Setup default FBO.
    methods related to skydome background

    Generates skydome cubemap.

    void updateSkydomeBg (const occ::handle< OpenGl_Context > &theCtx)
    methods related to PBR

    Checks whether PBR is available.

    bool checkPBRAvailability () const
     Generates IBL maps used in PBR pipeline. If background cubemap is not set clears all IBL maps.
    void updatePBREnvironment (const occ::handle< OpenGl_Context > &theCtx)
     Generates IBL maps used in PBR pipeline. If background cubemap is not set clears all IBL maps.
    methods related to ray-tracing

    Updates 3D scene geometry for ray-tracing.

    bool updateRaytraceGeometry (const RaytraceUpdateMode theMode, const int theViewId, const occ::handle< OpenGl_Context > &theGlContext)
     Updates 3D scene light sources for ray-tracing.
    bool updateRaytraceLightSources (const NCollection_Mat4< float > &theInvModelView, const occ::handle< OpenGl_Context > &theGlContext)
     Updates 3D scene light sources for ray-tracing.
    bool toUpdateStructure (const OpenGl_Structure *theStructure)
     Checks to see if the OpenGL structure is modified.
    bool addRaytraceStructure (const OpenGl_Structure *theStructure, const occ::handle< OpenGl_Context > &theGlContext)
     Adds OpenGL structure to ray-traced scene geometry.
    bool addRaytraceGroups (const OpenGl_Structure *theStructure, const OpenGl_RaytraceMaterial &theStructMat, const occ::handle< TopLoc_Datum3D > &theTrsf, const occ::handle< OpenGl_Context > &theGlContext)
     Adds OpenGL groups to ray-traced scene geometry.
    OpenGl_RaytraceMaterial convertMaterial (const OpenGl_Aspects *theAspect, const occ::handle< OpenGl_Context > &theGlContext)
     Creates ray-tracing material properties.
    occ::handle< OpenGl_TriangleSet > addRaytracePrimitiveArray (const OpenGl_PrimitiveArray *theArray, const int theMatID, const NCollection_Mat4< float > *theTrans)
     Adds OpenGL primitive array to ray-traced scene geometry.
    bool addRaytraceVertexIndices (OpenGl_TriangleSet &theSet, const int theMatID, const int theCount, const int theOffset, const OpenGl_PrimitiveArray &theArray)
     Adds vertex indices from OpenGL primitive array to ray-traced scene geometry.
    bool addRaytraceTriangleArray (OpenGl_TriangleSet &theSet, const int theMatID, const int theCount, const int theOffset, const occ::handle< Graphic3d_IndexBuffer > &theIndices)
     Adds OpenGL triangle array to ray-traced scene geometry.
    bool addRaytraceTriangleFanArray (OpenGl_TriangleSet &theSet, const int theMatID, const int theCount, const int theOffset, const occ::handle< Graphic3d_IndexBuffer > &theIndices)
     Adds OpenGL triangle fan array to ray-traced scene geometry.
    bool addRaytraceTriangleStripArray (OpenGl_TriangleSet &theSet, const int theMatID, const int theCount, const int theOffset, const occ::handle< Graphic3d_IndexBuffer > &theIndices)
     Adds OpenGL triangle strip array to ray-traced scene geometry.
    bool addRaytraceQuadrangleArray (OpenGl_TriangleSet &theSet, const int theMatID, const int theCount, const int theOffset, const occ::handle< Graphic3d_IndexBuffer > &theIndices)
     Adds OpenGL quadrangle array to ray-traced scene geometry.
    bool addRaytraceQuadrangleStripArray (OpenGl_TriangleSet &theSet, const int theMatID, const int theCount, const int theOffset, const occ::handle< Graphic3d_IndexBuffer > &theIndices)
     Adds OpenGL quadrangle strip array to ray-traced scene geometry.
    bool addRaytracePolygonArray (OpenGl_TriangleSet &theSet, const int theMatID, const int theCount, const int theOffset, const occ::handle< Graphic3d_IndexBuffer > &theIndices)
     Adds OpenGL polygon array to ray-traced scene geometry.
    bool uploadRaytraceData (const occ::handle< OpenGl_Context > &theGlContext)
     Uploads ray-trace data to the GPU.
    TCollection_AsciiString generateShaderPrefix (const occ::handle< OpenGl_Context > &theGlContext) const
     Generates shader prefix based on current ray-tracing options.
    bool safeFailBack (const TCollection_ExtendedString &theMessage, const occ::handle< OpenGl_Context > &theGlContext)
     Performs safe exit when shaders initialization fails.
    occ::handle< OpenGl_ShaderObject > initShader (const GLenum theType, const ShaderSource &theSource, const occ::handle< OpenGl_Context > &theGlContext)
     Loads and compiles shader object from specified source.
    occ::handle< OpenGl_ShaderProgram > initProgram (const occ::handle< OpenGl_Context > &theGlContext, const occ::handle< OpenGl_ShaderObject > &theVertShader, const occ::handle< OpenGl_ShaderObject > &theFragShader, const TCollection_AsciiString &theName)
     Creates shader program from the given vertex and fragment shaders.
    bool initRaytraceResources (const int theSizeX, const int theSizeY, const occ::handle< OpenGl_Context > &theGlContext)
     Initializes OpenGL/GLSL shader programs.
    void releaseRaytraceResources (const occ::handle< OpenGl_Context > &theGlContext, const bool theToRebuild=false)
     Releases OpenGL/GLSL shader programs.
    bool updateRaytraceBuffers (const int theSizeX, const int theSizeY, const occ::handle< OpenGl_Context > &theGlContext)
     Updates auxiliary OpenGL frame buffers.
    void updateCamera (const NCollection_Mat4< float > &theOrientation, const NCollection_Mat4< float > &theViewMapping, NCollection_Vec3< float > *theOrigins, NCollection_Vec3< float > *theDirects, NCollection_Mat4< float > &theView, NCollection_Mat4< float > &theUnView)
     Generates viewing rays for corners of screen quad. (ray tracing; path tracing for orthographic camera).
    void updatePerspCameraPT (const NCollection_Mat4< float > &theOrientation, const NCollection_Mat4< float > &theViewMapping, Graphic3d_Camera::Projection theProjection, NCollection_Mat4< float > &theViewPr, NCollection_Mat4< float > &theUnview, const int theWinSizeX, const int theWinSizeY)
     Generate viewing rays (path tracing, perspective camera).
    void bindRaytraceTextures (const occ::handle< OpenGl_Context > &theGlContext, int theStereoView)
     Binds ray-trace textures to corresponding texture units.
    void unbindRaytraceTextures (const occ::handle< OpenGl_Context > &theGlContext)
     Unbinds ray-trace textures from corresponding texture unit.
    bool setUniformState (const int theProgramId, const int theSizeX, const int theSizeY, Graphic3d_Camera::Projection theProjection, const occ::handle< OpenGl_Context > &theGlContext)
     Sets uniform state for the given ray-tracing shader program.
    bool runRaytraceShaders (const int theSizeX, const int theSizeY, Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, const occ::handle< OpenGl_Context > &theGlContext)
     Runs ray-tracing shader programs.
    bool runRaytrace (const int theSizeX, const int theSizeY, Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, const occ::handle< OpenGl_Context > &theGlContext)
     Runs classical (Whitted-style) ray-tracing kernel.
    bool runPathtrace (const int theSizeX, const int theSizeY, Graphic3d_Camera::Projection theProjection, const occ::handle< OpenGl_Context > &theGlContext)
     Runs path tracing (global illumination) kernel.
    bool runPathtraceOut (Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, const occ::handle< OpenGl_Context > &theGlContext)
     Runs path tracing (global illumination) kernel.
    bool raytrace (const int theSizeX, const int theSizeY, Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, const occ::handle< OpenGl_Context > &theGlContext)
     Redraws the window using OpenGL/GLSL ray-tracing or path tracing.
    Protected Member Functions inherited from Graphic3d_DataStructureManager
     Graphic3d_DataStructureManager ()
     Initializes the manager <me>.

    Protected Attributes

    Rendering properties

    Two framebuffers (left and right views) store cached main presentation of the view (without presentation of immediate layers).

    int mySRgbState
     track sRGB state
    GLint myFboColorFormat
     sized format for color attachments
    GLint myFboDepthFormat
     sized format for depth-stencil attachments
    NCollection_DynamicArray< int > myFboOitColorConfig
     selected color format configuration for OIT color attachments
    occ::handle< OpenGl_FrameBuffer > myMainSceneFbos [2]
     track sRGB state
    occ::handle< OpenGl_FrameBuffer > myMainSceneFbosOit [2]
     Additional buffers for transparent draw of main layer.
    occ::handle< OpenGl_FrameBuffer > myImmediateSceneFbos [2]
     Additional buffers for immediate layer in stereo mode.
    occ::handle< OpenGl_FrameBuffer > myImmediateSceneFbosOit [2]
     Additional buffers for transparency draw of immediate layer.
    occ::handle< OpenGl_FrameBuffer > myXrSceneFbo
     additional FBO (without MSAA) for submitting to XR
    occ::handle< OpenGl_DepthPeeling > myDepthPeelingFbos
     additional buffers for depth peeling
    occ::handle< OpenGl_ShadowMapArray > myShadowMaps
     additional FBOs for shadow map rendering
    OpenGl_VertexBuffer myFullScreenQuad
     Vertices for full-screen quad rendering.
    OpenGl_VertexBuffer myFullScreenQuadFlip
     track sRGB state
    bool myToFlipOutput
     Flag to draw result image upside-down.
    unsigned int myFrameCounter
     redraw counter, for debugging
    bool myHasFboBlit
     disable FBOs on failure
    bool myToDisableOIT
     disable OIT on failure
    bool myToDisableOITMSAA
     disable OIT with MSAA on failure
    bool myToDisableMSAA
     disable MSAA after failure
    bool myTransientDrawToFront
     optimization flag for immediate mode (to render directly to the front buffer)
    bool myBackBufferRestored
     track sRGB state
    bool myIsImmediateDrawn
     flag indicates that immediate mode buffer contains some data
    Background parameters
    OpenGl_Aspects * myTextureParams
     Stores texture and its parameters for textured background.
    OpenGl_Aspects * myCubeMapParams
     Stores cubemap and its parameters for cubemap background.
    OpenGl_Aspects * myColoredQuadParams
     Stores parameters for gradient (corner mode) background.
    OpenGl_ShaderGrid myShaderGrid
     shader grid state and geometry model
    unsigned int myGridVao
     dedicated VAO for textureless grid draw
    OpenGl_BackgroundArray * myBackgrounds [Graphic3d_TypeOfBackground_NB]
     Array of primitive arrays of different background types.
    occ::handle< OpenGl_TextureSet > myTextureEnv
     Stores texture and its parameters for textured background.
    occ::handle< OpenGl_Texture > mySkydomeTexture
     Stores texture and its parameters for textured background.
    int myId
     list of child views
    Graphic3d_RenderingParams myRenderParams
     list of child views
    NCollection_Sequence< occ::handle< Graphic3d_CView > > mySubviews
     list of child views
    Graphic3d_CView * myParentView
     back-pointer to the parent view
    bool myIsSubviewComposer
     flag to skip rendering of viewer contents
    Aspect_TypeOfTriedronPosition mySubviewCorner
     position within parent view
    NCollection_Vec2< int > mySubviewTopLeft
     subview top-left position relative to parent view
    NCollection_Vec2< int > mySubviewMargins
     subview margins in pixels
    NCollection_Vec2< double > mySubviewSize
     subview size
    NCollection_Vec2< double > mySubviewOffset
     subview corner offset within parent view
    occ::handle< Graphic3d_StructureManager > myStructureManager
     list of child views
    occ::handle< Graphic3d_Camera > myCamera
     list of child views
    NCollection_Sequence< occ::handle< Graphic3d_Structure > > myStructsToCompute
     list of child views
    NCollection_Sequence< occ::handle< Graphic3d_Structure > > myStructsComputed
     list of child views
    NCollection_Map< occ::handle< Graphic3d_Structure > > myStructsDisplayed
     list of child views
    bool myIsInComputedMode
     list of child views
    bool myIsActive
     list of child views
    bool myIsRemoved
     list of child views
    Graphic3d_TypeOfBackfacingModel myBackfacing
     list of child views
    Graphic3d_TypeOfVisualization myVisualization
     list of child views
    Graphic3d_ZLayerId myZLayerTarget
     ZLayerId for redrawing the content of specific zlayers.
    bool myZLayerRedrawMode
     If true redraws single layer, otherwise redraws group of layers.
    Quantity_ColorRGBA myBgColor
     list of child views
    occ::handle< Graphic3d_TextureMap > myBackgroundImage
     list of child views
    occ::handle< Graphic3d_CubeMap > myCubeMapBackground
     Cubemap displayed at background.
    occ::handle< Graphic3d_CubeMap > myCubeMapIBL
     Cubemap used for environment lighting.
    occ::handle< Graphic3d_TextureEnv > myTextureEnvData
     list of child views
    Graphic3d_GraduatedTrihedron myGTrihedronData
     list of child views
    Graphic3d_TypeOfBackground myBackgroundType
     Current type of background.
    Aspect_SkydomeBackground mySkydomeAspect
     list of child views
    bool myToUpdateSkydome
     list of child views
    occ::handle< Aspect_XRSession > myXRSession
     list of child views
    occ::handle< Graphic3d_Camera > myBackXRCamera
     camera projection parameters to restore after closing XR session (FOV, aspect and similar)
    occ::handle< Graphic3d_Camera > myBaseXRCamera
     neutral camera orientation defining coordinate system in which head tracking is defined
    occ::handle< Graphic3d_Camera > myPosedXRCamera
     transient XR camera orientation with tracked head orientation applied (based on myBaseXRCamera)
    occ::handle< Graphic3d_Camera > myPosedXRCameraCopy
     neutral camera orientation copy at the beginning of processing input
    double myUnitFactor
     unit scale factor defined as scale factor for m (meters)

    fields and types related to PBR

    State of PBR environment.

    enum  PBREnvironmentState { OpenGl_PBREnvState_NONEXISTENT , OpenGl_PBREnvState_UNAVAILABLE , OpenGl_PBREnvState_CREATED }
     manager of IBL maps used in PBR pipeline More...
    occ::handle< OpenGl_PBREnvironment > myPBREnvironment
     manager of IBL maps used in PBR pipeline
    PBREnvironmentState myPBREnvState
     state of PBR environment
    bool myPBREnvRequest
     update PBR environment

    data types related to ray-tracing

    Result of OpenGL shaders initialization.

    enum  RaytraceInitStatus { OpenGl_RT_NONE , OpenGl_RT_INIT , OpenGl_RT_FAIL }
     Describes update mode (state). More...
    enum  RaytraceUpdateMode { OpenGl_GUM_CHECK , OpenGl_GUM_PREPARE , OpenGl_GUM_REBUILD }
     Describes update mode (state). More...
    enum  ShaderVariableIndex {
      OpenGl_RT_aPosition , OpenGl_RT_uOriginLT , OpenGl_RT_uOriginLB , OpenGl_RT_uOriginRT ,
      OpenGl_RT_uOriginRB , OpenGl_RT_uDirectLT , OpenGl_RT_uDirectLB , OpenGl_RT_uDirectRT ,
      OpenGl_RT_uDirectRB , OpenGl_RT_uViewPrMat , OpenGl_RT_uUnviewMat , OpenGl_RT_uSceneRad ,
      OpenGl_RT_uSceneEps , OpenGl_RT_uLightAmbnt , OpenGl_RT_uLightCount , OpenGl_RT_uBackColorTop ,
      OpenGl_RT_uBackColorBot , OpenGl_RT_uShadowsEnabled , OpenGl_RT_uReflectEnabled , OpenGl_RT_uEnvMapEnabled ,
      OpenGl_RT_uEnvMapForBack , OpenGl_RT_uTexSamplersArray , OpenGl_RT_uBlockedRngEnabled , OpenGl_RT_uWinSizeX ,
      OpenGl_RT_uWinSizeY , OpenGl_RT_uAccumSamples , OpenGl_RT_uFrameRndSeed , OpenGl_RT_uFsaaOffset ,
      OpenGl_RT_uSamples , OpenGl_RT_uRenderImage , OpenGl_RT_uTilesImage , OpenGl_RT_uOffsetImage ,
      OpenGl_RT_uTileSize , OpenGl_RT_uVarianceScaleFactor , OpenGl_RT_uMaxRadiance , OpenGl_RT_NbVariables
    }
     Defines frequently used shader variables. More...
    enum  ShaderImageNames { OpenGl_RT_OutputImage = 0 , OpenGl_RT_VisualErrorImage = 1 , OpenGl_RT_TileOffsetsImage = 2 , OpenGl_RT_TileSamplesImage = 3 }
     Defines OpenGL image samplers. More...
    static constexpr int THE_DEFAULT_NB_BOUNCES = 3
     Default ray-tracing depth.
    static constexpr int THE_DEFAULT_STACK_SIZE = 10
     Default size of traversal stack.

    Rendering of GL graphics (with prepared drawing buffer).

    Renders the graphical contents of the view into the prepared shadowmap framebuffer.

    Parameters
    [in]theShadowMapthe framebuffer for rendering shadowmap.
    typedef std::pair< size_t, size_t > StateInfo
     main list of displayed structure, sorted by layers
    OpenGl_GraphicDriver * myDriver
     main list of displayed structure, sorted by layers
    occ::handle< OpenGl_Window > myWindow
     main list of displayed structure, sorted by layers
    occ::handle< OpenGl_Workspace > myWorkspace
     main list of displayed structure, sorted by layers
    occ::handle< OpenGl_Caps > myCaps
     main list of displayed structure, sorted by layers
    bool myWasRedrawnGL
     main list of displayed structure, sorted by layers
    occ::handle< Graphic3d_SequenceOfHClipPlane > myClipPlanes
     main list of displayed structure, sorted by layers
    gp_XYZ myLocalOrigin
     main list of displayed structure, sorted by layers
    occ::handle< OpenGl_FrameBuffer > myFBO
     main list of displayed structure, sorted by layers
    bool myToShowGradTrihedron
     main list of displayed structure, sorted by layers
    Graphic3d_GraduatedTrihedron myGTrihedronData
     main list of displayed structure, sorted by layers
    occ::handle< Graphic3d_LightSet > myNoShadingLight
     main list of displayed structure, sorted by layers
    occ::handle< Graphic3d_LightSet > myLights
     main list of displayed structure, sorted by layers
    OpenGl_LayerList myZLayers
     main list of displayed structure, sorted by layers
    Graphic3d_WorldViewProjState myWorldViewProjState
     camera modification state
    OpenGl_StateCounter * myStateCounter
     main list of displayed structure, sorted by layers
    size_t myCurrLightSourceState
     main list of displayed structure, sorted by layers
    size_t myLightsRevision
     main list of displayed structure, sorted by layers
    StateInfo myLastOrientationState
     main list of displayed structure, sorted by layers
    StateInfo myLastViewMappingState
     main list of displayed structure, sorted by layers
    StateInfo myLastLightSourceState
     main list of displayed structure, sorted by layers
    Graphic3d_CullingTool myBVHSelector
     Is needed for selection of overlapping objects and storage of the current view volume.
    OpenGl_GraduatedTrihedron myGraduatedTrihedron
     main list of displayed structure, sorted by layers
    OpenGl_FrameStatsPrs myFrameStatsPrs
     main list of displayed structure, sorted by layers
    occ::handle< OpenGl_FrameBuffer > myOpenGlFBO
     Framebuffers for OpenGL output.
    occ::handle< OpenGl_FrameBuffer > myOpenGlFBO2
     main list of displayed structure, sorted by layers
    virtual void renderShadowMap (const occ::handle< OpenGl_ShadowMap > &theShadowMap)
     main list of displayed structure, sorted by layers
    virtual void render (Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, OpenGl_FrameBuffer *theOitAccumFbo, const bool theToDrawImmediate)
     Renders the graphical contents of the view into the prepared window or framebuffer.
    virtual void renderScene (Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, OpenGl_FrameBuffer *theOitAccumFbo, const bool theToDrawImmediate)
     Renders the graphical scene.
    virtual void drawBackground (const occ::handle< OpenGl_Workspace > &theWorkspace, Graphic3d_Camera::Projection theProjection)
     Draw background (gradient / image / cubemap).
    virtual void renderStructs (Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, OpenGl_FrameBuffer *theOitAccumFbo, const bool theToDrawImmediate)
     Render set of structures presented in the view.
    void renderTrihedron (const occ::handle< OpenGl_Workspace > &theWorkspace)
     Renders trihedron.
    void renderFrameStats ()
     Renders frame statistics.
    void renderGrid ()
     Render the shader-based grid. No-op unless GridDisplay() has been called and the GAPI supports the grid shader.

    fields related to ray-tracing

    Result of RT/PT shaders initialization.

    RaytraceInitStatus myRaytraceInitStatus
     Is ray-tracing geometry data valid?
    bool myIsRaytraceDataValid
     Is ray-tracing geometry data valid?
    bool myIsRaytraceWarnTextures
     True if warning about missing extension GL_ARB_bindless_texture has been displayed.
    OpenGl_RaytraceGeometry myRaytraceGeometry
     3D scene geometry data for ray-tracing.
    opencascade::handle< BVH_Builder< float, 3 > > myRaytraceBVHBuilder
     Builder for triangle set.
    RaytracingParams myRaytraceParameters
     Compile-time ray-tracing parameters.
    float myRaytraceSceneRadius
     Radius of bounding sphere of the scene.
    float myRaytraceSceneEpsilon
     Scene epsilon to prevent self-intersections.
    ShaderSource myRaytraceShaderSource
     OpenGL/GLSL source of ray-tracing fragment shader.
    ShaderSource myPostFSAAShaderSource
     OpenGL/GLSL source of adaptive-AA fragment shader.
    ShaderSource myOutImageShaderSource
     OpenGL/GLSL source of RT/PT display fragment shader.
    occ::handle< OpenGl_ShaderObject > myRaytraceShader
     OpenGL/GLSL ray-tracing fragment shader.
    occ::handle< OpenGl_ShaderObject > myPostFSAAShader
     OpenGL/GLSL adaptive-AA fragment shader.
    occ::handle< OpenGl_ShaderObject > myOutImageShader
     OpenGL/GLSL ray-tracing display fragment shader.
    occ::handle< OpenGl_ShaderProgram > myRaytraceProgram
     OpenGL/GLSL ray-tracing shader program.
    occ::handle< OpenGl_ShaderProgram > myPostFSAAProgram
     OpenGL/GLSL adaptive-AA shader program.
    occ::handle< OpenGl_ShaderProgram > myOutImageProgram
     OpenGL/GLSL program for displaying texture.
    occ::handle< OpenGl_TextureBuffer > mySceneNodeInfoTexture
     Texture buffer of data records of bottom-level BVH nodes.
    occ::handle< OpenGl_TextureBuffer > mySceneMinPointTexture
     Texture buffer of minimum points of bottom-level BVH nodes.
    occ::handle< OpenGl_TextureBuffer > mySceneMaxPointTexture
     Texture buffer of maximum points of bottom-level BVH nodes.
    occ::handle< OpenGl_TextureBuffer > mySceneTransformTexture
     Texture buffer of transformations of high-level BVH nodes.
    occ::handle< OpenGl_TextureBuffer > myGeometryVertexTexture
     Texture buffer of vertex coords.
    occ::handle< OpenGl_TextureBuffer > myGeometryNormalTexture
     Texture buffer of vertex normals.
    occ::handle< OpenGl_TextureBuffer > myGeometryTexCrdTexture
     Texture buffer of vertex UV coords.
    occ::handle< OpenGl_TextureBuffer > myGeometryTriangTexture
     Texture buffer of triangle indices.
    occ::handle< OpenGl_TextureBuffer > myRaytraceMaterialTexture
     Texture buffer of material properties.
    occ::handle< OpenGl_TextureBuffer > myRaytraceLightSrcTexture
     Texture buffer of light source properties.
    occ::handle< OpenGl_FrameBuffer > myRaytraceFBO1 [2]
     1st framebuffer (FBO) to perform adaptive FSAA. Used in compatibility mode (no adaptive sampling).
    occ::handle< OpenGl_FrameBuffer > myRaytraceFBO2 [2]
     2nd framebuffer (FBO) to perform adaptive FSAA. Used in compatibility mode (no adaptive sampling).
    occ::handle< OpenGl_Texture > myRaytraceOutputTexture [2]
     Output textures (2 textures are used in stereo mode). Used if adaptive screen sampling is activated.
    occ::handle< OpenGl_Texture > myRaytraceVisualErrorTexture [2]
     Texture containing per-tile visual error estimation (2 textures are used in stereo mode). Used if adaptive screen sampling is activated.
    occ::handle< OpenGl_Texture > myRaytraceTileOffsetsTexture [2]
     Texture containing offsets of sampled screen tiles (2 textures are used in stereo mode). Used if adaptive screen sampling is activated.
    occ::handle< OpenGl_Texture > myRaytraceTileSamplesTexture [2]
     Texture containing amount of extra per-tile samples (2 textures are used in stereo mode). Used if adaptive screen sampling is activated.
    OpenGl_VertexBuffer myRaytraceScreenQuad
     Vertex buffer (VBO) for drawing dummy quad.
    int myUniformLocations [2][OpenGl_RT_NbVariables]
     Cached locations of frequently used uniform variables.
    NCollection_DataMap< const OpenGl_Structure *, StructState > myStructureStates
     State of OpenGL structures reflected to ray-tracing.
    NCollection_DataMap< size_t, OpenGl_TriangleSet * > myArrayToTrianglesMap
     PrimitiveArray to TriangleSet map for scene partial update.
    NCollection_Map< int > myNonRaytraceStructureIDs
     Set of IDs of non-raytracable elements (to detect updates).
    bool myToUpdateEnvironmentMap
     Marks if environment map should be updated.
    size_t myRaytraceLayerListState
     State of OpenGL layer list.
    int myAccumFrames
     Number of accumulated frames (for progressive rendering).
    NCollection_Vec3< float > myPreviousOrigins [3]
     Stored ray origins used for detection of camera movements.
    math_BullardGenerator myRNG
     Bullard RNG to produce random sequence.
    OpenGl_TileSampler myTileSampler
     Tool object for sampling screen tiles in PT mode.
    NCollection_Vec3< float > myEyeOrig
     Camera position used for projective mode.
    NCollection_Vec3< float > myEyeView
     Camera view direction used for projective mode.
    NCollection_Vec3< float > myEyeVert
     Camera's screen vertical direction used for projective mode.
    NCollection_Vec3< float > myEyeSide
     Camera's screen horizontal direction used for projective mode.
    NCollection_Vec2< float > myEyeSize
     Camera's screen size used for projective mode.
    float myPrevCameraApertureRadius
     Aperture radius of camera on previous frame used for depth-of-field (path tracing).
    float myPrevCameraFocalPlaneDist
     Focal distance of camera on previous frame used for depth-of-field (path tracing).

    Additional Inherited Members

    typedef void base_type
     Returns a type descriptor about this object.
    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.

    Detailed Description

    Implementation of OpenGl view.

    Member Typedef Documentation

    ◆ StateInfo

    typedef std::pair<size_t, size_t> OpenGl_View::StateInfo
    protected

    main list of displayed structure, sorted by layers

    Member Enumeration Documentation

    ◆ PBREnvironmentState

    manager of IBL maps used in PBR pipeline

    Enumerator
    OpenGl_PBREnvState_NONEXISTENT 
    OpenGl_PBREnvState_UNAVAILABLE 
    OpenGl_PBREnvState_CREATED 

    ◆ RaytraceInitStatus

    Describes update mode (state).

    Enumerator
    OpenGl_RT_NONE 
    OpenGl_RT_INIT 
    OpenGl_RT_FAIL 

    ◆ RaytraceUpdateMode

    Describes update mode (state).

    Enumerator
    OpenGl_GUM_CHECK 

    check geometry state

    OpenGl_GUM_PREPARE 

    collect unchanged objects

    OpenGl_GUM_REBUILD 

    rebuild changed and new objects

    ◆ ShaderImageNames

    Defines OpenGL image samplers.

    Enumerator
    OpenGl_RT_OutputImage 
    OpenGl_RT_VisualErrorImage 
    OpenGl_RT_TileOffsetsImage 
    OpenGl_RT_TileSamplesImage 

    ◆ ShaderVariableIndex

    Defines frequently used shader variables.

    Enumerator
    OpenGl_RT_aPosition 
    OpenGl_RT_uOriginLT 
    OpenGl_RT_uOriginLB 
    OpenGl_RT_uOriginRT 
    OpenGl_RT_uOriginRB 
    OpenGl_RT_uDirectLT 
    OpenGl_RT_uDirectLB 
    OpenGl_RT_uDirectRT 
    OpenGl_RT_uDirectRB 
    OpenGl_RT_uViewPrMat 
    OpenGl_RT_uUnviewMat 
    OpenGl_RT_uSceneRad 
    OpenGl_RT_uSceneEps 
    OpenGl_RT_uLightAmbnt 
    OpenGl_RT_uLightCount 
    OpenGl_RT_uBackColorTop 
    OpenGl_RT_uBackColorBot 
    OpenGl_RT_uShadowsEnabled 
    OpenGl_RT_uReflectEnabled 
    OpenGl_RT_uEnvMapEnabled 
    OpenGl_RT_uEnvMapForBack 
    OpenGl_RT_uTexSamplersArray 
    OpenGl_RT_uBlockedRngEnabled 
    OpenGl_RT_uWinSizeX 
    OpenGl_RT_uWinSizeY 
    OpenGl_RT_uAccumSamples 
    OpenGl_RT_uFrameRndSeed 
    OpenGl_RT_uFsaaOffset 
    OpenGl_RT_uSamples 
    OpenGl_RT_uRenderImage 
    OpenGl_RT_uTilesImage 
    OpenGl_RT_uOffsetImage 
    OpenGl_RT_uTileSize 
    OpenGl_RT_uVarianceScaleFactor 
    OpenGl_RT_uMaxRadiance 
    OpenGl_RT_NbVariables 

    Constructor & Destructor Documentation

    ◆ OpenGl_View()

    OpenGl_View::OpenGl_View ( const occ::handle< Graphic3d_StructureManager > & theMgr,
    const occ::handle< OpenGl_GraphicDriver > & theDriver,
    const occ::handle< OpenGl_Caps > & theCaps,
    OpenGl_StateCounter * theCounter )

    Constructor.

    ◆ ~OpenGl_View()

    OpenGl_View::~OpenGl_View ( )
    override

    Default destructor.

    Member Function Documentation

    ◆ addRaytraceGroups()

    bool OpenGl_View::addRaytraceGroups ( const OpenGl_Structure * theStructure,
    const OpenGl_RaytraceMaterial & theStructMat,
    const occ::handle< TopLoc_Datum3D > & theTrsf,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Adds OpenGL groups to ray-traced scene geometry.

    ◆ addRaytracePolygonArray()

    bool OpenGl_View::addRaytracePolygonArray ( OpenGl_TriangleSet & theSet,
    const int theMatID,
    const int theCount,
    const int theOffset,
    const occ::handle< Graphic3d_IndexBuffer > & theIndices )
    protected

    Adds OpenGL polygon array to ray-traced scene geometry.

    ◆ addRaytracePrimitiveArray()

    occ::handle< OpenGl_TriangleSet > OpenGl_View::addRaytracePrimitiveArray ( const OpenGl_PrimitiveArray * theArray,
    const int theMatID,
    const NCollection_Mat4< float > * theTrans )
    protected

    Adds OpenGL primitive array to ray-traced scene geometry.

    ◆ addRaytraceQuadrangleArray()

    bool OpenGl_View::addRaytraceQuadrangleArray ( OpenGl_TriangleSet & theSet,
    const int theMatID,
    const int theCount,
    const int theOffset,
    const occ::handle< Graphic3d_IndexBuffer > & theIndices )
    protected

    Adds OpenGL quadrangle array to ray-traced scene geometry.

    ◆ addRaytraceQuadrangleStripArray()

    bool OpenGl_View::addRaytraceQuadrangleStripArray ( OpenGl_TriangleSet & theSet,
    const int theMatID,
    const int theCount,
    const int theOffset,
    const occ::handle< Graphic3d_IndexBuffer > & theIndices )
    protected

    Adds OpenGL quadrangle strip array to ray-traced scene geometry.

    ◆ addRaytraceStructure()

    bool OpenGl_View::addRaytraceStructure ( const OpenGl_Structure * theStructure,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Adds OpenGL structure to ray-traced scene geometry.

    ◆ addRaytraceTriangleArray()

    bool OpenGl_View::addRaytraceTriangleArray ( OpenGl_TriangleSet & theSet,
    const int theMatID,
    const int theCount,
    const int theOffset,
    const occ::handle< Graphic3d_IndexBuffer > & theIndices )
    protected

    Adds OpenGL triangle array to ray-traced scene geometry.

    ◆ addRaytraceTriangleFanArray()

    bool OpenGl_View::addRaytraceTriangleFanArray ( OpenGl_TriangleSet & theSet,
    const int theMatID,
    const int theCount,
    const int theOffset,
    const occ::handle< Graphic3d_IndexBuffer > & theIndices )
    protected

    Adds OpenGL triangle fan array to ray-traced scene geometry.

    ◆ addRaytraceTriangleStripArray()

    bool OpenGl_View::addRaytraceTriangleStripArray ( OpenGl_TriangleSet & theSet,
    const int theMatID,
    const int theCount,
    const int theOffset,
    const occ::handle< Graphic3d_IndexBuffer > & theIndices )
    protected

    Adds OpenGL triangle strip array to ray-traced scene geometry.

    ◆ addRaytraceVertexIndices()

    bool OpenGl_View::addRaytraceVertexIndices ( OpenGl_TriangleSet & theSet,
    const int theMatID,
    const int theCount,
    const int theOffset,
    const OpenGl_PrimitiveArray & theArray )
    protected

    Adds vertex indices from OpenGL primitive array to ray-traced scene geometry.

    ◆ BackgroundColor()

    const Quantity_ColorRGBA & OpenGl_View::BackgroundColor ( ) const
    inline

    Returns background color.

    ◆ BackgroundImageStyle()

    Aspect_FillMethod OpenGl_View::BackgroundImageStyle ( ) const
    overridevirtual

    Returns background image fill style.

    Implements Graphic3d_CView.

    ◆ bindDefaultFbo()

    void OpenGl_View::bindDefaultFbo ( OpenGl_FrameBuffer * theCustomFbo = nullptr)
    protected

    Setup default FBO.

    ◆ bindRaytraceTextures()

    void OpenGl_View::bindRaytraceTextures ( const occ::handle< OpenGl_Context > & theGlContext,
    int theStereoView )
    protected

    Binds ray-trace textures to corresponding texture units.

    ◆ blitBuffers()

    bool OpenGl_View::blitBuffers ( OpenGl_FrameBuffer * theReadFbo,
    OpenGl_FrameBuffer * theDrawFbo,
    const bool theToFlip = false )
    protected

    Blit image from/to specified buffers.

    ◆ blitSubviews()

    bool OpenGl_View::blitSubviews ( const Graphic3d_Camera::Projection theProjection,
    OpenGl_FrameBuffer * theDrawFbo )
    protected

    Blit subviews into this view.

    ◆ BufferDump()

    bool OpenGl_View::BufferDump ( Image_PixMap & theImage,
    const Graphic3d_BufferType & theBufferType )
    overridevirtual

    Dump active rendering buffer into specified memory buffer. In Ray-Tracing allow to get a raw HDR buffer using Graphic3d_BT_RGB_RayTraceHdrLeft buffer type, only Left view will be dumped ignoring stereoscopic parameter.

    Implements Graphic3d_CView.

    ◆ BVHTreeSelector()

    const Graphic3d_CullingTool & OpenGl_View::BVHTreeSelector ( ) const
    inline

    Returns selector for BVH tree, providing a possibility to store information about current view volume and to detect which objects are overlapping it.

    ◆ ChangeGraduatedTrihedron()

    OpenGl_GraduatedTrihedron & OpenGl_View::ChangeGraduatedTrihedron ( )
    inline

    Change graduated trihedron.

    ◆ checkPBRAvailability()

    bool OpenGl_View::checkPBRAvailability ( ) const
    protected

    Generates IBL maps used in PBR pipeline. If background cubemap is not set clears all IBL maps.

    ◆ ClipPlanes()

    const occ::handle< Graphic3d_SequenceOfHClipPlane > & OpenGl_View::ClipPlanes ( ) const
    inlineoverridevirtual

    Returns list of clip planes set for the view.

    Implements Graphic3d_CView.

    ◆ convertMaterial()

    OpenGl_RaytraceMaterial OpenGl_View::convertMaterial ( const OpenGl_Aspects * theAspect,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Creates ray-tracing material properties.

    ◆ DepthPeelingFbos()

    const occ::handle< OpenGl_DepthPeeling > & OpenGl_View::DepthPeelingFbos ( ) const
    inline

    Returns additional buffers for depth peeling OIT.

    ◆ DiagnosticInformation()

    void OpenGl_View::DiagnosticInformation ( NCollection_IndexedDataMap< TCollection_AsciiString, TCollection_AsciiString > & theDict,
    Graphic3d_DiagnosticInfo theFlags ) const
    overridevirtual

    Fill in the dictionary with diagnostic info. Should be called within rendering thread.

    This API should be used only for user output or for creating automated reports. The format of returned information (e.g. key-value layout) is NOT part of this API and can be changed at any time. Thus application should not parse returned information to weed out specific parameters.

    Implements Graphic3d_CView.

    ◆ drawBackground()

    virtual void OpenGl_View::drawBackground ( const occ::handle< OpenGl_Workspace > & theWorkspace,
    Graphic3d_Camera::Projection theProjection )
    protectedvirtual

    Draw background (gradient / image / cubemap).

    ◆ FBO()

    occ::handle< Standard_Transient > OpenGl_View::FBO ( ) const
    overridevirtual

    Returns pointer to an assigned framebuffer object.

    Implements Graphic3d_CView.

    ◆ FBOChangeViewport()

    void OpenGl_View::FBOChangeViewport ( const occ::handle< Standard_Transient > & theFbo,
    const int theWidth,
    const int theHeight )
    overridevirtual

    Change offscreen FBO viewport.

    Implements Graphic3d_CView.

    ◆ FBOCreate()

    occ::handle< Standard_Transient > OpenGl_View::FBOCreate ( const int theWidth,
    const int theHeight )
    overridevirtual

    Generate offscreen FBO in the graphic library. If not supported on hardware returns NULL.

    Implements Graphic3d_CView.

    ◆ FBOGetDimensions()

    void OpenGl_View::FBOGetDimensions ( const occ::handle< Standard_Transient > & theFbo,
    int & theWidth,
    int & theHeight,
    int & theWidthMax,
    int & theHeightMax )
    overridevirtual

    Read offscreen FBO configuration.

    Implements Graphic3d_CView.

    ◆ FBORelease()

    void OpenGl_View::FBORelease ( occ::handle< Standard_Transient > & theFbo)
    overridevirtual

    Remove offscreen FBO from the graphic library.

    Implements Graphic3d_CView.

    ◆ generateShaderPrefix()

    TCollection_AsciiString OpenGl_View::generateShaderPrefix ( const occ::handle< OpenGl_Context > & theGlContext) const
    protected

    Generates shader prefix based on current ray-tracing options.

    ◆ GlTextureEnv()

    const occ::handle< OpenGl_TextureSet > & OpenGl_View::GlTextureEnv ( ) const
    inline

    Returns OpenGL environment map.

    ◆ GlWindow()

    const occ::handle< OpenGl_Window > & OpenGl_View::GlWindow ( ) const
    inline

    Returns OpenGL window implementation.

    ◆ GradientBackground()

    Aspect_GradientBackground OpenGl_View::GradientBackground ( ) const
    overridevirtual

    Returns gradient background fill colors.

    Implements Graphic3d_CView.

    ◆ GraduatedTrihedronDisplay()

    void OpenGl_View::GraduatedTrihedronDisplay ( const Graphic3d_GraduatedTrihedron & theTrihedronData)
    overridevirtual

    Erases Graduated Trihedron.

    Reimplemented from Graphic3d_CView.

    ◆ GraduatedTrihedronErase()

    void OpenGl_View::GraduatedTrihedronErase ( )
    overridevirtual

    Erases Graduated Trihedron.

    Reimplemented from Graphic3d_CView.

    ◆ GraduatedTrihedronMinMaxValues()

    void OpenGl_View::GraduatedTrihedronMinMaxValues ( const NCollection_Vec3< float > theMin,
    const NCollection_Vec3< float > theMax )
    overridevirtual

    Sets minimum and maximum points of scene bounding box for Graduated Trihedron stored in graphic view object.

    Parameters
    [in]theMinthe minimum point of scene.
    [in]theMaxthe maximum point of scene.

    Reimplemented from Graphic3d_CView.

    ◆ GridDisplay()

    void OpenGl_View::GridDisplay ( const Aspect_GridParams & theParams,
    const gp_Ax3 & thePlane )
    overridevirtual

    Display a shader-rendered grid on the given plane.

    Reimplemented from Graphic3d_CView.

    ◆ GridErase()

    void OpenGl_View::GridErase ( )
    overridevirtual

    Erase the shader-rendered grid.

    Reimplemented from Graphic3d_CView.

    ◆ HasImmediateStructures()

    bool OpenGl_View::HasImmediateStructures ( ) const
    inline

    Returns true if there are immediate structures to display.

    ◆ initProgram()

    occ::handle< OpenGl_ShaderProgram > OpenGl_View::initProgram ( const occ::handle< OpenGl_Context > & theGlContext,
    const occ::handle< OpenGl_ShaderObject > & theVertShader,
    const occ::handle< OpenGl_ShaderObject > & theFragShader,
    const TCollection_AsciiString & theName )
    protected

    Creates shader program from the given vertex and fragment shaders.

    ◆ initRaytraceResources()

    bool OpenGl_View::initRaytraceResources ( const int theSizeX,
    const int theSizeY,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Initializes OpenGL/GLSL shader programs.

    ◆ initShader()

    occ::handle< OpenGl_ShaderObject > OpenGl_View::initShader ( const GLenum theType,
    const ShaderSource & theSource,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Loads and compiles shader object from specified source.

    ◆ initTextureEnv()

    void OpenGl_View::initTextureEnv ( const occ::handle< OpenGl_Context > & theContext)
    protected

    ◆ InsertLayerAfter()

    void OpenGl_View::InsertLayerAfter ( const Graphic3d_ZLayerId theNewLayerId,
    const Graphic3d_ZLayerSettings & theSettings,
    const Graphic3d_ZLayerId theLayerBefore )
    overridevirtual

    Add a layer to the view.

    Parameters
    [in]theNewLayerIdid of new layer, should be > 0 (negative values are reserved for default layers).
    [in]theSettingsnew layer settings
    [in]theLayerBeforeid of layer to append new layer after

    Implements Graphic3d_CView.

    ◆ InsertLayerBefore()

    void OpenGl_View::InsertLayerBefore ( const Graphic3d_ZLayerId theLayerId,
    const Graphic3d_ZLayerSettings & theSettings,
    const Graphic3d_ZLayerId theLayerAfter )
    overridevirtual

    Add a layer to the view.

    Parameters
    [in]theNewLayerIdid of new layer, should be > 0 (negative values are reserved for default layers).
    [in]theSettingsnew layer settings
    [in]theLayerAfterid of layer to append new layer before

    Implements Graphic3d_CView.

    ◆ Invalidate()

    void OpenGl_View::Invalidate ( )
    overridevirtual

    Marks BVH tree for given priority list as dirty and marks primitive set for rebuild.

    Implements Graphic3d_CView.

    ◆ InvalidateBVHData()

    void OpenGl_View::InvalidateBVHData ( const Graphic3d_ZLayerId theLayerId)
    overridevirtual

    Marks BVH tree and the set of BVH primitives of correspondent priority list with id theLayerId as outdated.

    Implements Graphic3d_CView.

    ◆ IsDefined()

    bool OpenGl_View::IsDefined ( ) const
    inlineoverridevirtual

    Returns True if the window associated to the view is defined.

    Implements Graphic3d_CView.

    ◆ IsInvalidated()

    bool OpenGl_View::IsInvalidated ( )
    inlineoverridevirtual

    Return true if view content cache has been invalidated.

    Implements Graphic3d_CView.

    ◆ Layer()

    occ::handle< Graphic3d_Layer > OpenGl_View::Layer ( const Graphic3d_ZLayerId theLayerId) const
    overridevirtual

    Returns layer with given ID or NULL if undefined.

    Implements Graphic3d_CView.

    ◆ LayerList()

    const OpenGl_LayerList & OpenGl_View::LayerList ( ) const
    inline

    Returns list of OpenGL Z-layers.

    ◆ Layers()

    const NCollection_List< occ::handle< Graphic3d_Layer > > & OpenGl_View::Layers ( ) const
    overridevirtual

    Returns the list of layers.

    Implements Graphic3d_CView.

    ◆ Lights()

    const occ::handle< Graphic3d_LightSet > & OpenGl_View::Lights ( ) const
    inlineoverridevirtual

    Returns list of lights of the view.

    Implements Graphic3d_CView.

    ◆ LocalOrigin()

    const gp_XYZ & OpenGl_View::LocalOrigin ( ) const
    inline

    Returns local camera origin currently set for rendering, might be modified during rendering.

    ◆ MinMaxValues()

    Bnd_Box OpenGl_View::MinMaxValues ( const bool theToIncludeAuxiliary) const
    overridevirtual

    Returns the bounding box of all structures displayed in the view. If theToIncludeAuxiliary is TRUE, then the boundary box also includes minimum and maximum limits of graphical elements forming parts of infinite and other auxiliary structures.

    Parameters
    theToIncludeAuxiliaryconsider also auxiliary presentations (with infinite flag or with trihedron transformation persistence)
    Returns
    computed bounding box

    Reimplemented from Graphic3d_CView.

    ◆ prepareFrameBuffers()

    virtual bool OpenGl_View::prepareFrameBuffers ( Graphic3d_Camera::Projection & theProj)
    protectedvirtual

    Redraws view for the given monographic camera projection, or left/right eye.

    ◆ raytrace()

    bool OpenGl_View::raytrace ( const int theSizeX,
    const int theSizeY,
    Graphic3d_Camera::Projection theProjection,
    OpenGl_FrameBuffer * theReadDrawFbo,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Redraws the window using OpenGL/GLSL ray-tracing or path tracing.

    ◆ Redraw()

    void OpenGl_View::Redraw ( )
    overridevirtual

    Redraw content of the view.

    Implements Graphic3d_CView.

    ◆ redraw()

    virtual void OpenGl_View::redraw ( const Graphic3d_Camera::Projection theProjection,
    OpenGl_FrameBuffer * theReadDrawFbo,
    OpenGl_FrameBuffer * theOitAccumFbo )
    protectedvirtual

    Redraws view for the given monographic camera projection, or left/right eye.

    ◆ RedrawImmediate()

    void OpenGl_View::RedrawImmediate ( )
    overridevirtual

    Redraw immediate content of the view.

    Implements Graphic3d_CView.

    ◆ redrawImmediate()

    virtual bool OpenGl_View::redrawImmediate ( const Graphic3d_Camera::Projection theProjection,
    OpenGl_FrameBuffer * theReadFbo,
    OpenGl_FrameBuffer * theDrawFbo,
    OpenGl_FrameBuffer * theOitAccumFbo,
    const bool theIsPartialUpdate = false )
    protectedvirtual

    Redraws view for the given monographic camera projection, or left/right eye.

    Method will blit snapshot containing main scene (myMainSceneFbos or BackBuffer) into presentation buffer (myMainSceneFbos -> offscreen FBO or myMainSceneFbos -> BackBuffer or BackBuffer -> FrontBuffer), and redraw immediate structures on top.

    When scene caching is disabled (myTransientDrawToFront, no double buffer in window, etc.), the first step (blitting) will be skipped.

    Returns
    false if immediate structures has been rendered directly into FrontBuffer and Buffer Swap should not be called.

    ◆ ReleaseGlResources()

    virtual void OpenGl_View::ReleaseGlResources ( const occ::handle< OpenGl_Context > & theCtx)
    virtual

    Release OpenGL resources.

    Reimplemented in D3DHost_View.

    ◆ releaseRaytraceResources()

    void OpenGl_View::releaseRaytraceResources ( const occ::handle< OpenGl_Context > & theGlContext,
    const bool theToRebuild = false )
    protected

    Releases OpenGL/GLSL shader programs.

    ◆ Remove()

    void OpenGl_View::Remove ( )
    overridevirtual

    Deletes and erases the view.

    Reimplemented from Graphic3d_CView.

    ◆ RemoveZLayer()

    void OpenGl_View::RemoveZLayer ( const Graphic3d_ZLayerId theLayerId)
    overridevirtual

    Remove a z layer with the given ID.

    Implements Graphic3d_CView.

    ◆ render()

    virtual void OpenGl_View::render ( Graphic3d_Camera::Projection theProjection,
    OpenGl_FrameBuffer * theReadDrawFbo,
    OpenGl_FrameBuffer * theOitAccumFbo,
    const bool theToDrawImmediate )
    protectedvirtual

    Renders the graphical contents of the view into the prepared window or framebuffer.

    Parameters
    [in]theProjectionthe projection that should be used for rendering.
    [in]theReadDrawFbothe framebuffer for rendering graphics.
    [in]theOitAccumFbothe framebuffer for accumulating color and coverage for OIT process.
    [in]theToDrawImmediatethe flag indicates whether the rendering performs in immediate mode.

    ◆ renderFrameStats()

    void OpenGl_View::renderFrameStats ( )
    protected

    Renders frame statistics.

    ◆ renderGrid()

    void OpenGl_View::renderGrid ( )
    protected

    Render the shader-based grid. No-op unless GridDisplay() has been called and the GAPI supports the grid shader.

    ◆ renderScene()

    virtual void OpenGl_View::renderScene ( Graphic3d_Camera::Projection theProjection,
    OpenGl_FrameBuffer * theReadDrawFbo,
    OpenGl_FrameBuffer * theOitAccumFbo,
    const bool theToDrawImmediate )
    protectedvirtual

    Renders the graphical scene.

    Parameters
    [in]theProjectionthe projection that is used for rendering.
    [in]theReadDrawFbothe framebuffer for rendering graphics.
    [in]theOitAccumFbothe framebuffer for accumulating color and coverage for OIT process.
    [in]theToDrawImmediatethe flag indicates whether the rendering performs in immediate mode.

    ◆ renderShadowMap()

    virtual void OpenGl_View::renderShadowMap ( const occ::handle< OpenGl_ShadowMap > & theShadowMap)
    protectedvirtual

    main list of displayed structure, sorted by layers

    ◆ renderStructs()

    virtual void OpenGl_View::renderStructs ( Graphic3d_Camera::Projection theProjection,
    OpenGl_FrameBuffer * theReadDrawFbo,
    OpenGl_FrameBuffer * theOitAccumFbo,
    const bool theToDrawImmediate )
    protectedvirtual

    Render set of structures presented in the view.

    Parameters
    [in]theProjectionthe projection that is used for rendering.
    [in]theReadDrawFbothe framebuffer for rendering graphics.
    [in]theOitAccumFbothe framebuffer for accumulating color and coverage for OIT process.
    [in]theToDrawImmediatethe flag indicates whether the rendering performs in immediate mode.

    ◆ renderTrihedron()

    void OpenGl_View::renderTrihedron ( const occ::handle< OpenGl_Workspace > & theWorkspace)
    protected

    Renders trihedron.

    ◆ Resized()

    void OpenGl_View::Resized ( )
    overridevirtual

    Handle changing size of the rendering window.

    Implements Graphic3d_CView.

    ◆ runPathtrace()

    bool OpenGl_View::runPathtrace ( const int theSizeX,
    const int theSizeY,
    Graphic3d_Camera::Projection theProjection,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Runs path tracing (global illumination) kernel.

    ◆ runPathtraceOut()

    bool OpenGl_View::runPathtraceOut ( Graphic3d_Camera::Projection theProjection,
    OpenGl_FrameBuffer * theReadDrawFbo,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Runs path tracing (global illumination) kernel.

    ◆ runRaytrace()

    bool OpenGl_View::runRaytrace ( const int theSizeX,
    const int theSizeY,
    Graphic3d_Camera::Projection theProjection,
    OpenGl_FrameBuffer * theReadDrawFbo,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Runs classical (Whitted-style) ray-tracing kernel.

    ◆ runRaytraceShaders()

    bool OpenGl_View::runRaytraceShaders ( const int theSizeX,
    const int theSizeY,
    Graphic3d_Camera::Projection theProjection,
    OpenGl_FrameBuffer * theReadDrawFbo,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Runs ray-tracing shader programs.

    ◆ safeFailBack()

    bool OpenGl_View::safeFailBack ( const TCollection_ExtendedString & theMessage,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Performs safe exit when shaders initialization fails.

    ◆ SetBackgroundGradient()

    void OpenGl_View::SetBackgroundGradient ( const Quantity_Color & AColor1,
    const Quantity_Color & AColor2,
    const Aspect_GradientFillMethod AType )

    ◆ SetBackgroundGradientType()

    void OpenGl_View::SetBackgroundGradientType ( const Aspect_GradientFillMethod AType)

    ◆ SetBackgroundImage()

    void OpenGl_View::SetBackgroundImage ( const occ::handle< Graphic3d_TextureMap > & theTextureMap,
    bool theToUpdatePBREnv = true )
    overridevirtual

    Sets image texture or environment cubemap as background.

    Parameters
    [in]theTextureMapsource to set a background; should be either Graphic3d_Texture2D or Graphic3d_CubeMap
    [in]theToUpdatePBREnvdefines whether IBL maps will be generated or not (see GeneratePBREnvironment())

    Implements Graphic3d_CView.

    ◆ SetBackgroundImageStyle()

    void OpenGl_View::SetBackgroundImageStyle ( const Aspect_FillMethod theFillStyle)
    overridevirtual

    Sets background image fill style.

    Implements Graphic3d_CView.

    ◆ SetBackgroundTextureStyle()

    void OpenGl_View::SetBackgroundTextureStyle ( const Aspect_FillMethod FillStyle)

    ◆ SetClipPlanes()

    void OpenGl_View::SetClipPlanes ( const occ::handle< Graphic3d_SequenceOfHClipPlane > & thePlanes)
    inlineoverridevirtual

    Sets list of clip planes for the view.

    Implements Graphic3d_CView.

    ◆ SetFBO()

    void OpenGl_View::SetFBO ( const occ::handle< Standard_Transient > & theFbo)
    overridevirtual

    Sets framebuffer object for offscreen rendering.

    Implements Graphic3d_CView.

    ◆ SetGradientBackground()

    void OpenGl_View::SetGradientBackground ( const Aspect_GradientBackground & theBackground)
    overridevirtual

    Sets gradient background fill colors.

    Implements Graphic3d_CView.

    ◆ SetImageBasedLighting()

    void OpenGl_View::SetImageBasedLighting ( bool theToEnableIBL)
    overridevirtual

    Enables or disables IBL (Image Based Lighting) from background cubemap. Has no effect if PBR is not used.

    Parameters
    [in]theToEnableIBLenable or disable IBL from background cubemap

    Implements Graphic3d_CView.

    ◆ SetImmediateModeDrawToFront()

    bool OpenGl_View::SetImmediateModeDrawToFront ( const bool theDrawToFrontBuffer)
    overridevirtual
    Parameters
    theDrawToFrontBufferAdvanced option to modify rendering mode:
    1. TRUE. Drawing immediate mode structures directly to the front buffer over the scene image. Fast, so preferred for interactive work (used by default). However these extra drawings will be missed in image dump since it is performed from back buffer. Notice that since no pre-buffering used the V-Sync will be ignored and rendering could be seen in run-time (in case of slow hardware) and/or tearing may appear. So this is strongly recommended to draw only simple (fast) structures.
    2. FALSE. Drawing immediate mode structures to the back buffer. The complete scene is redrawn first, so this mode is slower if scene contains complex data and/or V-Sync is turned on. But it works in any case and is especially useful for view dump because the dump image is read from the back buffer.
    Returns
    previous mode.

    Implements Graphic3d_CView.

    ◆ SetLights()

    void OpenGl_View::SetLights ( const occ::handle< Graphic3d_LightSet > & theLights)
    inlineoverridevirtual

    Sets list of lights for the view.

    Implements Graphic3d_CView.

    ◆ SetLocalOrigin()

    void OpenGl_View::SetLocalOrigin ( const gp_XYZ & theOrigin)

    Setup local camera origin currently set for rendering.

    ◆ SetTextureEnv() [1/2]

    void OpenGl_View::SetTextureEnv ( const occ::handle< Graphic3d_TextureEnv > & theTextureEnv)
    overridevirtual

    Sets environment texture for the view.

    Implements Graphic3d_CView.

    ◆ SetTextureEnv() [2/2]

    void OpenGl_View::SetTextureEnv ( const occ::handle< OpenGl_Context > & theCtx,
    const occ::handle< Graphic3d_TextureEnv > & theTexture )

    ◆ SetToFlipOutput()

    void OpenGl_View::SetToFlipOutput ( const bool theFlip)
    inlineoverridevirtual

    Sets state of flip OY necessity in projection matrix.

    Reimplemented from Graphic3d_CView.

    ◆ setUniformState()

    bool OpenGl_View::setUniformState ( const int theProgramId,
    const int theSizeX,
    const int theSizeY,
    Graphic3d_Camera::Projection theProjection,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Sets uniform state for the given ray-tracing shader program.

    ◆ SetWindow()

    void OpenGl_View::SetWindow ( const occ::handle< Graphic3d_CView > & theParentVIew,
    const occ::handle< Aspect_Window > & theWindow,
    const Aspect_RenderingContext theContext )
    overridevirtual

    Creates and maps rendering window to the view.

    Implements Graphic3d_CView.

    ◆ SetZLayerSettings()

    void OpenGl_View::SetZLayerSettings ( const Graphic3d_ZLayerId theLayerId,
    const Graphic3d_ZLayerSettings & theSettings )
    overridevirtual

    Sets the settings for a single Z layer of specified view.

    Implements Graphic3d_CView.

    ◆ ShaderGridEcho() [1/2]

    bool OpenGl_View::ShaderGridEcho ( const int theX,
    const int theY,
    Graphic3d_Vertex & thePoint ) const
    overridevirtual

    Return snapped point for the shader-rendered grid under the window pixel.

    Reimplemented from Graphic3d_CView.

    ◆ ShaderGridEcho() [2/2]

    bool OpenGl_View::ShaderGridEcho ( const int theX,
    const int theY,
    Graphic3d_Vertex & thePoint,
    Graphic3d_Vertex & theDisplayPoint ) const
    overridevirtual

    Return snapped point and clip-safe display point for the shader-rendered grid echo marker.

    Reimplemented from Graphic3d_CView.

    ◆ ShaderGridSnapPoint()

    bool OpenGl_View::ShaderGridSnapPoint ( const Graphic3d_Vertex & thePoint,
    Graphic3d_Vertex & theGridPoint ) const
    overridevirtual

    Return snapped point for the shader-rendered grid from an arbitrary world point.

    Reimplemented from Graphic3d_CView.

    ◆ ShadowMapDump()

    bool OpenGl_View::ShadowMapDump ( Image_PixMap & theImage,
    const TCollection_AsciiString & theLightName )
    overridevirtual

    Dumps the graphical contents of a shadowmap framebuffer into an image.

    Parameters
    theImagethe image to store the shadow map.
    [in]theLightNamename of the light used to generate the shadow map.

    Implements Graphic3d_CView.

    ◆ SpecIBLMapLevels()

    unsigned int OpenGl_View::SpecIBLMapLevels ( ) const

    Returns number of mipmap levels used in specular IBL map. 0 if PBR environment is not created.

    ◆ StatisticInformation() [1/2]

    TCollection_AsciiString OpenGl_View::StatisticInformation ( ) const
    overridevirtual

    Returns string with statistic performance info.

    Implements Graphic3d_CView.

    ◆ StatisticInformation() [2/2]

    void OpenGl_View::StatisticInformation ( NCollection_IndexedDataMap< TCollection_AsciiString, TCollection_AsciiString > & theDict) const
    overridevirtual

    Fills in the dictionary with statistic performance info.

    Implements Graphic3d_CView.

    ◆ ToFlipOutput()

    bool OpenGl_View::ToFlipOutput ( ) const
    inlineoverridevirtual

    Returns necessity to flip OY in projection matrix.

    Reimplemented from Graphic3d_CView.

    ◆ toUpdateStructure()

    bool OpenGl_View::toUpdateStructure ( const OpenGl_Structure * theStructure)
    protected

    Checks to see if the OpenGL structure is modified.

    ◆ unbindRaytraceTextures()

    void OpenGl_View::unbindRaytraceTextures ( const occ::handle< OpenGl_Context > & theGlContext)
    protected

    Unbinds ray-trace textures from corresponding texture unit.

    ◆ updateCamera()

    void OpenGl_View::updateCamera ( const NCollection_Mat4< float > & theOrientation,
    const NCollection_Mat4< float > & theViewMapping,
    NCollection_Vec3< float > * theOrigins,
    NCollection_Vec3< float > * theDirects,
    NCollection_Mat4< float > & theView,
    NCollection_Mat4< float > & theUnView )
    protected

    Generates viewing rays for corners of screen quad. (ray tracing; path tracing for orthographic camera).

    ◆ updatePBREnvironment()

    void OpenGl_View::updatePBREnvironment ( const occ::handle< OpenGl_Context > & theCtx)
    protected

    Generates IBL maps used in PBR pipeline. If background cubemap is not set clears all IBL maps.

    ◆ updatePerspCameraPT()

    void OpenGl_View::updatePerspCameraPT ( const NCollection_Mat4< float > & theOrientation,
    const NCollection_Mat4< float > & theViewMapping,
    Graphic3d_Camera::Projection theProjection,
    NCollection_Mat4< float > & theViewPr,
    NCollection_Mat4< float > & theUnview,
    const int theWinSizeX,
    const int theWinSizeY )
    protected

    Generate viewing rays (path tracing, perspective camera).

    ◆ updateRaytraceBuffers()

    bool OpenGl_View::updateRaytraceBuffers ( const int theSizeX,
    const int theSizeY,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Updates auxiliary OpenGL frame buffers.

    ◆ updateRaytraceGeometry()

    bool OpenGl_View::updateRaytraceGeometry ( const RaytraceUpdateMode theMode,
    const int theViewId,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Updates 3D scene light sources for ray-tracing.

    ◆ updateRaytraceLightSources()

    bool OpenGl_View::updateRaytraceLightSources ( const NCollection_Mat4< float > & theInvModelView,
    const occ::handle< OpenGl_Context > & theGlContext )
    protected

    Updates 3D scene light sources for ray-tracing.

    ◆ updateSkydomeBg()

    void OpenGl_View::updateSkydomeBg ( const occ::handle< OpenGl_Context > & theCtx)
    protected

    ◆ uploadRaytraceData()

    bool OpenGl_View::uploadRaytraceData ( const occ::handle< OpenGl_Context > & theGlContext)
    protected

    Uploads ray-trace data to the GPU.

    ◆ Window()

    occ::handle< Aspect_Window > OpenGl_View::Window ( ) const
    overridevirtual

    Returns window associated with the view.

    Implements Graphic3d_CView.

    ◆ ZFitAllBounds()

    void OpenGl_View::ZFitAllBounds ( Bnd_Box & thePrimaryBox,
    Bnd_Box & theGraphicBox ) const
    overridevirtual

    Return primary and graphical bounding boxes used by camera Z fitting.

    Reimplemented from Graphic3d_CView.

    ◆ ZLayerMax()

    int OpenGl_View::ZLayerMax ( ) const
    overridevirtual

    Returns the maximum Z layer ID. First layer ID is Graphic3d_ZLayerId_Default, last ID is ZLayerMax().

    Implements Graphic3d_CView.

    Field Documentation

    ◆ myAccumFrames

    int OpenGl_View::myAccumFrames
    protected

    Number of accumulated frames (for progressive rendering).

    ◆ myArrayToTrianglesMap

    NCollection_DataMap<size_t, OpenGl_TriangleSet*> OpenGl_View::myArrayToTrianglesMap
    protected

    PrimitiveArray to TriangleSet map for scene partial update.

    ◆ myBackBufferRestored

    bool OpenGl_View::myBackBufferRestored
    protected

    track sRGB state

    ◆ myBackgrounds

    OpenGl_BackgroundArray* OpenGl_View::myBackgrounds[Graphic3d_TypeOfBackground_NB]
    protected

    Array of primitive arrays of different background types.

    ◆ myBVHSelector

    Graphic3d_CullingTool OpenGl_View::myBVHSelector
    protected

    Is needed for selection of overlapping objects and storage of the current view volume.

    ◆ myCaps

    occ::handle<OpenGl_Caps> OpenGl_View::myCaps
    protected

    main list of displayed structure, sorted by layers

    ◆ myClipPlanes

    occ::handle<Graphic3d_SequenceOfHClipPlane> OpenGl_View::myClipPlanes
    protected

    main list of displayed structure, sorted by layers

    ◆ myColoredQuadParams

    OpenGl_Aspects* OpenGl_View::myColoredQuadParams
    protected

    Stores parameters for gradient (corner mode) background.

    ◆ myCubeMapParams

    OpenGl_Aspects* OpenGl_View::myCubeMapParams
    protected

    Stores cubemap and its parameters for cubemap background.

    ◆ myCurrLightSourceState

    size_t OpenGl_View::myCurrLightSourceState
    protected

    main list of displayed structure, sorted by layers

    ◆ myDepthPeelingFbos

    occ::handle<OpenGl_DepthPeeling> OpenGl_View::myDepthPeelingFbos
    protected

    additional buffers for depth peeling

    ◆ myDriver

    OpenGl_GraphicDriver* OpenGl_View::myDriver
    protected

    main list of displayed structure, sorted by layers

    ◆ myEyeOrig

    NCollection_Vec3<float> OpenGl_View::myEyeOrig
    protected

    Camera position used for projective mode.

    ◆ myEyeSide

    NCollection_Vec3<float> OpenGl_View::myEyeSide
    protected

    Camera's screen horizontal direction used for projective mode.

    ◆ myEyeSize

    NCollection_Vec2<float> OpenGl_View::myEyeSize
    protected

    Camera's screen size used for projective mode.

    ◆ myEyeVert

    NCollection_Vec3<float> OpenGl_View::myEyeVert
    protected

    Camera's screen vertical direction used for projective mode.

    ◆ myEyeView

    NCollection_Vec3<float> OpenGl_View::myEyeView
    protected

    Camera view direction used for projective mode.

    ◆ myFBO

    occ::handle<OpenGl_FrameBuffer> OpenGl_View::myFBO
    protected

    main list of displayed structure, sorted by layers

    ◆ myFboColorFormat

    GLint OpenGl_View::myFboColorFormat
    protected

    sized format for color attachments

    ◆ myFboDepthFormat

    GLint OpenGl_View::myFboDepthFormat
    protected

    sized format for depth-stencil attachments

    ◆ myFboOitColorConfig

    NCollection_DynamicArray<int> OpenGl_View::myFboOitColorConfig
    protected

    selected color format configuration for OIT color attachments

    ◆ myFrameCounter

    unsigned int OpenGl_View::myFrameCounter
    protected

    redraw counter, for debugging

    ◆ myFrameStatsPrs

    OpenGl_FrameStatsPrs OpenGl_View::myFrameStatsPrs
    protected

    main list of displayed structure, sorted by layers

    ◆ myFullScreenQuad

    OpenGl_VertexBuffer OpenGl_View::myFullScreenQuad
    protected

    Vertices for full-screen quad rendering.

    ◆ myFullScreenQuadFlip

    OpenGl_VertexBuffer OpenGl_View::myFullScreenQuadFlip
    protected

    track sRGB state

    ◆ myGeometryNormalTexture

    occ::handle<OpenGl_TextureBuffer> OpenGl_View::myGeometryNormalTexture
    protected

    Texture buffer of vertex normals.

    ◆ myGeometryTexCrdTexture

    occ::handle<OpenGl_TextureBuffer> OpenGl_View::myGeometryTexCrdTexture
    protected

    Texture buffer of vertex UV coords.

    ◆ myGeometryTriangTexture

    occ::handle<OpenGl_TextureBuffer> OpenGl_View::myGeometryTriangTexture
    protected

    Texture buffer of triangle indices.

    ◆ myGeometryVertexTexture

    occ::handle<OpenGl_TextureBuffer> OpenGl_View::myGeometryVertexTexture
    protected

    Texture buffer of vertex coords.

    ◆ myGraduatedTrihedron

    OpenGl_GraduatedTrihedron OpenGl_View::myGraduatedTrihedron
    protected

    main list of displayed structure, sorted by layers

    ◆ myGridVao

    unsigned int OpenGl_View::myGridVao
    protected

    dedicated VAO for textureless grid draw

    ◆ myGTrihedronData

    Graphic3d_GraduatedTrihedron OpenGl_View::myGTrihedronData
    protected

    main list of displayed structure, sorted by layers

    ◆ myHasFboBlit

    bool OpenGl_View::myHasFboBlit
    protected

    disable FBOs on failure

    ◆ myImmediateSceneFbos

    occ::handle<OpenGl_FrameBuffer> OpenGl_View::myImmediateSceneFbos[2]
    protected

    Additional buffers for immediate layer in stereo mode.

    ◆ myImmediateSceneFbosOit

    occ::handle<OpenGl_FrameBuffer> OpenGl_View::myImmediateSceneFbosOit[2]
    protected

    Additional buffers for transparency draw of immediate layer.

    ◆ myIsImmediateDrawn

    bool OpenGl_View::myIsImmediateDrawn
    protected

    flag indicates that immediate mode buffer contains some data

    ◆ myIsRaytraceDataValid

    bool OpenGl_View::myIsRaytraceDataValid
    protected

    Is ray-tracing geometry data valid?

    ◆ myIsRaytraceWarnTextures

    bool OpenGl_View::myIsRaytraceWarnTextures
    protected

    True if warning about missing extension GL_ARB_bindless_texture has been displayed.

    ◆ myLastLightSourceState

    StateInfo OpenGl_View::myLastLightSourceState
    protected

    main list of displayed structure, sorted by layers

    ◆ myLastOrientationState

    StateInfo OpenGl_View::myLastOrientationState
    protected

    main list of displayed structure, sorted by layers

    ◆ myLastViewMappingState

    StateInfo OpenGl_View::myLastViewMappingState
    protected

    main list of displayed structure, sorted by layers

    ◆ myLights

    occ::handle<Graphic3d_LightSet> OpenGl_View::myLights
    protected

    main list of displayed structure, sorted by layers

    ◆ myLightsRevision

    size_t OpenGl_View::myLightsRevision
    protected

    main list of displayed structure, sorted by layers

    ◆ myLocalOrigin

    gp_XYZ OpenGl_View::myLocalOrigin
    protected

    main list of displayed structure, sorted by layers

    ◆ myMainSceneFbos

    occ::handle<OpenGl_FrameBuffer> OpenGl_View::myMainSceneFbos[2]
    protected

    track sRGB state

    ◆ myMainSceneFbosOit

    occ::handle<OpenGl_FrameBuffer> OpenGl_View::myMainSceneFbosOit[2]
    protected

    Additional buffers for transparent draw of main layer.

    ◆ myNonRaytraceStructureIDs

    NCollection_Map<int> OpenGl_View::myNonRaytraceStructureIDs
    protected

    Set of IDs of non-raytracable elements (to detect updates).

    ◆ myNoShadingLight

    occ::handle<Graphic3d_LightSet> OpenGl_View::myNoShadingLight
    protected

    main list of displayed structure, sorted by layers

    ◆ myOpenGlFBO

    occ::handle<OpenGl_FrameBuffer> OpenGl_View::myOpenGlFBO
    protected

    Framebuffers for OpenGL output.

    ◆ myOpenGlFBO2

    occ::handle<OpenGl_FrameBuffer> OpenGl_View::myOpenGlFBO2
    protected

    main list of displayed structure, sorted by layers

    ◆ myOutImageProgram

    occ::handle<OpenGl_ShaderProgram> OpenGl_View::myOutImageProgram
    protected

    OpenGL/GLSL program for displaying texture.

    ◆ myOutImageShader

    occ::handle<OpenGl_ShaderObject> OpenGl_View::myOutImageShader
    protected

    OpenGL/GLSL ray-tracing display fragment shader.

    ◆ myOutImageShaderSource

    ShaderSource OpenGl_View::myOutImageShaderSource
    protected

    OpenGL/GLSL source of RT/PT display fragment shader.

    ◆ myPBREnvironment

    occ::handle<OpenGl_PBREnvironment> OpenGl_View::myPBREnvironment
    protected

    manager of IBL maps used in PBR pipeline

    ◆ myPBREnvRequest

    bool OpenGl_View::myPBREnvRequest
    protected

    update PBR environment

    ◆ myPBREnvState

    PBREnvironmentState OpenGl_View::myPBREnvState
    protected

    state of PBR environment

    ◆ myPostFSAAProgram

    occ::handle<OpenGl_ShaderProgram> OpenGl_View::myPostFSAAProgram
    protected

    OpenGL/GLSL adaptive-AA shader program.

    ◆ myPostFSAAShader

    occ::handle<OpenGl_ShaderObject> OpenGl_View::myPostFSAAShader
    protected

    OpenGL/GLSL adaptive-AA fragment shader.

    ◆ myPostFSAAShaderSource

    ShaderSource OpenGl_View::myPostFSAAShaderSource
    protected

    OpenGL/GLSL source of adaptive-AA fragment shader.

    ◆ myPrevCameraApertureRadius

    float OpenGl_View::myPrevCameraApertureRadius
    protected

    Aperture radius of camera on previous frame used for depth-of-field (path tracing).

    ◆ myPrevCameraFocalPlaneDist

    float OpenGl_View::myPrevCameraFocalPlaneDist
    protected

    Focal distance of camera on previous frame used for depth-of-field (path tracing).

    ◆ myPreviousOrigins

    NCollection_Vec3<float> OpenGl_View::myPreviousOrigins[3]
    protected

    Stored ray origins used for detection of camera movements.

    ◆ myRaytraceBVHBuilder

    opencascade::handle<BVH_Builder<float, 3> > OpenGl_View::myRaytraceBVHBuilder
    protected

    Builder for triangle set.

    ◆ myRaytraceFBO1

    occ::handle<OpenGl_FrameBuffer> OpenGl_View::myRaytraceFBO1[2]
    protected

    1st framebuffer (FBO) to perform adaptive FSAA. Used in compatibility mode (no adaptive sampling).

    ◆ myRaytraceFBO2

    occ::handle<OpenGl_FrameBuffer> OpenGl_View::myRaytraceFBO2[2]
    protected

    2nd framebuffer (FBO) to perform adaptive FSAA. Used in compatibility mode (no adaptive sampling).

    ◆ myRaytraceGeometry

    OpenGl_RaytraceGeometry OpenGl_View::myRaytraceGeometry
    protected

    3D scene geometry data for ray-tracing.

    ◆ myRaytraceInitStatus

    RaytraceInitStatus OpenGl_View::myRaytraceInitStatus
    protected

    Is ray-tracing geometry data valid?

    ◆ myRaytraceLayerListState

    size_t OpenGl_View::myRaytraceLayerListState
    protected

    State of OpenGL layer list.

    ◆ myRaytraceLightSrcTexture

    occ::handle<OpenGl_TextureBuffer> OpenGl_View::myRaytraceLightSrcTexture
    protected

    Texture buffer of light source properties.

    ◆ myRaytraceMaterialTexture

    occ::handle<OpenGl_TextureBuffer> OpenGl_View::myRaytraceMaterialTexture
    protected

    Texture buffer of material properties.

    ◆ myRaytraceOutputTexture

    occ::handle<OpenGl_Texture> OpenGl_View::myRaytraceOutputTexture[2]
    protected

    Output textures (2 textures are used in stereo mode). Used if adaptive screen sampling is activated.

    ◆ myRaytraceParameters

    RaytracingParams OpenGl_View::myRaytraceParameters
    protected

    Compile-time ray-tracing parameters.

    ◆ myRaytraceProgram

    occ::handle<OpenGl_ShaderProgram> OpenGl_View::myRaytraceProgram
    protected

    OpenGL/GLSL ray-tracing shader program.

    ◆ myRaytraceSceneEpsilon

    float OpenGl_View::myRaytraceSceneEpsilon
    protected

    Scene epsilon to prevent self-intersections.

    ◆ myRaytraceSceneRadius

    float OpenGl_View::myRaytraceSceneRadius
    protected

    Radius of bounding sphere of the scene.

    ◆ myRaytraceScreenQuad

    OpenGl_VertexBuffer OpenGl_View::myRaytraceScreenQuad
    protected

    Vertex buffer (VBO) for drawing dummy quad.

    ◆ myRaytraceShader

    occ::handle<OpenGl_ShaderObject> OpenGl_View::myRaytraceShader
    protected

    OpenGL/GLSL ray-tracing fragment shader.

    ◆ myRaytraceShaderSource

    ShaderSource OpenGl_View::myRaytraceShaderSource
    protected

    OpenGL/GLSL source of ray-tracing fragment shader.

    ◆ myRaytraceTileOffsetsTexture

    occ::handle<OpenGl_Texture> OpenGl_View::myRaytraceTileOffsetsTexture[2]
    protected

    Texture containing offsets of sampled screen tiles (2 textures are used in stereo mode). Used if adaptive screen sampling is activated.

    ◆ myRaytraceTileSamplesTexture

    occ::handle<OpenGl_Texture> OpenGl_View::myRaytraceTileSamplesTexture[2]
    protected

    Texture containing amount of extra per-tile samples (2 textures are used in stereo mode). Used if adaptive screen sampling is activated.

    ◆ myRaytraceVisualErrorTexture

    occ::handle<OpenGl_Texture> OpenGl_View::myRaytraceVisualErrorTexture[2]
    protected

    Texture containing per-tile visual error estimation (2 textures are used in stereo mode). Used if adaptive screen sampling is activated.

    ◆ myRNG

    math_BullardGenerator OpenGl_View::myRNG
    protected

    Bullard RNG to produce random sequence.

    ◆ mySceneMaxPointTexture

    occ::handle<OpenGl_TextureBuffer> OpenGl_View::mySceneMaxPointTexture
    protected

    Texture buffer of maximum points of bottom-level BVH nodes.

    ◆ mySceneMinPointTexture

    occ::handle<OpenGl_TextureBuffer> OpenGl_View::mySceneMinPointTexture
    protected

    Texture buffer of minimum points of bottom-level BVH nodes.

    ◆ mySceneNodeInfoTexture

    occ::handle<OpenGl_TextureBuffer> OpenGl_View::mySceneNodeInfoTexture
    protected

    Texture buffer of data records of bottom-level BVH nodes.

    ◆ mySceneTransformTexture

    occ::handle<OpenGl_TextureBuffer> OpenGl_View::mySceneTransformTexture
    protected

    Texture buffer of transformations of high-level BVH nodes.

    ◆ myShaderGrid

    OpenGl_ShaderGrid OpenGl_View::myShaderGrid
    protected

    shader grid state and geometry model

    ◆ myShadowMaps

    occ::handle<OpenGl_ShadowMapArray> OpenGl_View::myShadowMaps
    protected

    additional FBOs for shadow map rendering

    ◆ mySkydomeTexture

    occ::handle<OpenGl_Texture> OpenGl_View::mySkydomeTexture
    protected

    Stores texture and its parameters for textured background.

    ◆ mySRgbState

    int OpenGl_View::mySRgbState
    protected

    track sRGB state

    ◆ myStateCounter

    OpenGl_StateCounter* OpenGl_View::myStateCounter
    protected

    main list of displayed structure, sorted by layers

    ◆ myStructureStates

    NCollection_DataMap<const OpenGl_Structure*, StructState> OpenGl_View::myStructureStates
    protected

    State of OpenGL structures reflected to ray-tracing.

    ◆ myTextureEnv

    occ::handle<OpenGl_TextureSet> OpenGl_View::myTextureEnv
    protected

    Stores texture and its parameters for textured background.

    ◆ myTextureParams

    OpenGl_Aspects* OpenGl_View::myTextureParams
    protected

    Stores texture and its parameters for textured background.

    ◆ myTileSampler

    OpenGl_TileSampler OpenGl_View::myTileSampler
    protected

    Tool object for sampling screen tiles in PT mode.

    ◆ myToDisableMSAA

    bool OpenGl_View::myToDisableMSAA
    protected

    disable MSAA after failure

    ◆ myToDisableOIT

    bool OpenGl_View::myToDisableOIT
    protected

    disable OIT on failure

    ◆ myToDisableOITMSAA

    bool OpenGl_View::myToDisableOITMSAA
    protected

    disable OIT with MSAA on failure

    ◆ myToFlipOutput

    bool OpenGl_View::myToFlipOutput
    protected

    Flag to draw result image upside-down.

    ◆ myToShowGradTrihedron

    bool OpenGl_View::myToShowGradTrihedron
    protected

    main list of displayed structure, sorted by layers

    ◆ myToUpdateEnvironmentMap

    bool OpenGl_View::myToUpdateEnvironmentMap
    protected

    Marks if environment map should be updated.

    ◆ myTransientDrawToFront

    bool OpenGl_View::myTransientDrawToFront
    protected

    optimization flag for immediate mode (to render directly to the front buffer)

    ◆ myUniformLocations

    int OpenGl_View::myUniformLocations[2][OpenGl_RT_NbVariables]
    protected

    Cached locations of frequently used uniform variables.

    ◆ myWasRedrawnGL

    bool OpenGl_View::myWasRedrawnGL
    protected

    main list of displayed structure, sorted by layers

    ◆ myWindow

    occ::handle<OpenGl_Window> OpenGl_View::myWindow
    protected

    main list of displayed structure, sorted by layers

    ◆ myWorkspace

    occ::handle<OpenGl_Workspace> OpenGl_View::myWorkspace
    protected

    main list of displayed structure, sorted by layers

    ◆ myWorldViewProjState

    Graphic3d_WorldViewProjState OpenGl_View::myWorldViewProjState
    protected

    camera modification state

    ◆ myXrSceneFbo

    occ::handle<OpenGl_FrameBuffer> OpenGl_View::myXrSceneFbo
    protected

    additional FBO (without MSAA) for submitting to XR

    ◆ myZLayers

    OpenGl_LayerList OpenGl_View::myZLayers
    protected

    main list of displayed structure, sorted by layers

    ◆ THE_DEFAULT_NB_BOUNCES

    int OpenGl_View::THE_DEFAULT_NB_BOUNCES = 3
    staticconstexprprotected

    Default ray-tracing depth.

    ◆ THE_DEFAULT_STACK_SIZE

    int OpenGl_View::THE_DEFAULT_STACK_SIZE = 10
    staticconstexprprotected

    Default size of traversal stack.


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