Open CASCADE Technology  7.6.0
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes

D3DHost_View Class Reference

The D3D host view implementation that overrides rendering methods. More...

#include <D3DHost_View.hxx>

Inheritance diagram for D3DHost_View:
Inheritance graph
[legend]

Public Member Functions

 D3DHost_View (const Handle< Graphic3d_StructureManager > &theMgr, const Handle< D3DHost_GraphicDriver > &theDriver, const Handle< OpenGl_Caps > &theCaps, OpenGl_StateCounter *theCounter)
 Constructor. More...
 
virtual ~D3DHost_View ()
 Default destructor. More...
 
virtual void ReleaseGlResources (const Handle< OpenGl_Context > &theCtx) override
 Release OpenGL resources. More...
 
virtual void SetWindow (const Handle< Aspect_Window > &theWindow, const Aspect_RenderingContext theContext) override
 Creates and maps rendering window to the view. More...
 
virtual void Resized () override
 Resizes the window. More...
 
virtual void Redraw () override
 Redraw the all content. More...
 
virtual void RedrawImmediate () override
 Redraw only immediate layer. More...
 
virtual void DiagnosticInformation (TColStd_IndexedDataMapOfStringString &theDict, Graphic3d_DiagnosticInfo theFlags) const override
 Fill in the dictionary with diagnostic info. Should be called within rendering thread. More...
 
bool isD3dEx () const
 
IDirect3DDevice9 * D3dDevice () const
 Access Direct3D device instance. More...
 
const Handle< D3DHost_FrameBuffer > & D3dWglBuffer () const
 Return D3D/WGL FBO. More...
 
IDirect3DSurface9 * D3dColorSurface () const
 Return D3D surface. More...
 
- Public Member Functions inherited from OpenGl_View
 OpenGl_View (const Handle< Graphic3d_StructureManager > &theMgr, const Handle< OpenGl_GraphicDriver > &theDriver, const Handle< OpenGl_Caps > &theCaps, OpenGl_StateCounter *theCounter)
 Constructor. More...
 
virtual ~OpenGl_View ()
 Default destructor. More...
 
virtual void Remove () override
 Deletes and erases the view. More...
 
Standard_Boolean SetImmediateModeDrawToFront (const Standard_Boolean theDrawToFrontBuffer) override
 
virtual Handle< Aspect_WindowWindow () const override
 Returns window associated with the view. More...
 
virtual Standard_Boolean IsDefined () const override
 Returns True if the window associated to the view is defined. More...
 
virtual void Invalidate () override
 Marks BVH tree for given priority list as dirty and marks primitive set for rebuild. More...
 
virtual Standard_Boolean IsInvalidated () override
 Return true if view content cache has been invalidated. More...
 
virtual Standard_Boolean 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. More...
 
virtual 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. More...
 
virtual void InsertLayerBefore (const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings &theSettings, const Graphic3d_ZLayerId theLayerAfter) override
 Add a layer to the view. More...
 
virtual void InsertLayerAfter (const Graphic3d_ZLayerId theNewLayerId, const Graphic3d_ZLayerSettings &theSettings, const Graphic3d_ZLayerId theLayerBefore) override
 Add a layer to the view. More...
 
virtual void RemoveZLayer (const Graphic3d_ZLayerId theLayerId) override
 Remove a z layer with the given ID. More...
 
virtual void SetZLayerSettings (const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings &theSettings) override
 Sets the settings for a single Z layer of specified view. More...
 
virtual Standard_Integer ZLayerMax () const override
 Returns the maximum Z layer ID. First layer ID is Graphic3d_ZLayerId_Default, last ID is ZLayerMax(). More...
 
virtual const NCollection_List< Handle< Graphic3d_Layer > > & Layers () const override
 Returns the list of layers. More...
 
virtual Handle< Graphic3d_LayerLayer (const Graphic3d_ZLayerId theLayerId) const override
 Returns layer with given ID or NULL if undefined. More...
 
virtual Bnd_Box MinMaxValues (const Standard_Boolean 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. More...
 
virtual Handle< Standard_TransientFBO () const override
 Returns pointer to an assigned framebuffer object. More...
 
virtual void SetFBO (const Handle< Standard_Transient > &theFbo) override
 Sets framebuffer object for offscreen rendering. More...
 
virtual Handle< Standard_TransientFBOCreate (const Standard_Integer theWidth, const Standard_Integer theHeight) override
 Generate offscreen FBO in the graphic library. If not supported on hardware returns NULL. More...
 
virtual void FBORelease (Handle< Standard_Transient > &theFbo) override
 Remove offscreen FBO from the graphic library. More...
 
virtual void FBOGetDimensions (const Handle< Standard_Transient > &theFbo, Standard_Integer &theWidth, Standard_Integer &theHeight, Standard_Integer &theWidthMax, Standard_Integer &theHeightMax) override
 Read offscreen FBO configuration. More...
 
virtual void FBOChangeViewport (const Handle< Standard_Transient > &theFbo, const Standard_Integer theWidth, const Standard_Integer theHeight) override
 Change offscreen FBO viewport. More...
 
const Handle< OpenGl_DepthPeeling > & DepthPeelingFbos () const
 Returns additional buffers for depth peeling OIT. More...
 
virtual Aspect_GradientBackground GradientBackground () const override
 Returns gradient background fill colors. More...
 
virtual void SetGradientBackground (const Aspect_GradientBackground &theBackground) override
 Sets gradient background fill colors. More...
 
virtual void SetBackgroundImage (const Handle< Graphic3d_TextureMap > &theTextureMap, Standard_Boolean theToUpdatePBREnv=Standard_True) override
 Sets image texture or environment cubemap as background. More...
 
virtual void SetTextureEnv (const Handle< Graphic3d_TextureEnv > &theTextureEnv) override
 Sets environment texture for the view. More...
 
virtual Aspect_FillMethod BackgroundImageStyle () const override
 Returns background image fill style. More...
 
virtual void SetBackgroundImageStyle (const Aspect_FillMethod theFillStyle) override
 Sets background image fill style. More...
 
virtual void SetImageBasedLighting (Standard_Boolean theToEnableIBL) override
 Enables or disables IBL (Image Based Lighting) from background cubemap. Has no effect if PBR is not used. More...
 
unsigned int SpecIBLMapLevels () const
 Returns number of mipmap levels used in specular IBL map. 0 if PBR environment is not created. More...
 
const gp_XYZLocalOrigin () const
 Returns local camera origin currently set for rendering, might be modified during rendering. More...
 
void SetLocalOrigin (const gp_XYZ &theOrigin)
 Setup local camera origin currently set for rendering. More...
 
virtual const Handle< Graphic3d_LightSet > & Lights () const override
 Returns list of lights of the view. More...
 
virtual void SetLights (const Handle< Graphic3d_LightSet > &theLights) override
 Sets list of lights for the view. More...
 
virtual const Handle< Graphic3d_SequenceOfHClipPlane > & ClipPlanes () const override
 Returns list of clip planes set for the view. More...
 
virtual void SetClipPlanes (const Handle< Graphic3d_SequenceOfHClipPlane > &thePlanes) override
 Sets list of clip planes for the view. More...
 
virtual TCollection_AsciiString StatisticInformation () const override
 Returns string with statistic performance info. More...
 
virtual void StatisticInformation (TColStd_IndexedDataMapOfStringString &theDict) const override
 Fills in the dictionary with statistic performance info. More...
 
const Quantity_ColorRGBABackgroundColor () const
 Returns background color. More...
 
OpenGl_GraduatedTrihedronChangeGraduatedTrihedron ()
 Change graduated trihedron. More...
 
void SetTextureEnv (const Handle< OpenGl_Context > &theCtx, const 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_LayerListLayerList () const
 Returns list of OpenGL Z-layers. More...
 
const Handle< OpenGl_Window > & GlWindow () const
 Returns OpenGL window implementation. More...
 
const Handle< OpenGl_TextureSet > & GlTextureEnv () const
 Returns OpenGL environment map. More...
 
const Graphic3d_CullingToolBVHTreeSelector () const
 Returns selector for BVH tree, providing a possibility to store information about current view volume and to detect which objects are overlapping it. More...
 
bool HasImmediateStructures () const
 Returns true if there are immediate structures to display. More...
 
virtual void GraduatedTrihedronDisplay (const Graphic3d_GraduatedTrihedron &theTrihedronData) override
 Displays Graduated Trihedron. More...
 
virtual void GraduatedTrihedronErase () override
 Erases Graduated Trihedron. More...
 
virtual void GraduatedTrihedronMinMaxValues (const Graphic3d_Vec3 theMin, const Graphic3d_Vec3 theMax) override
 Sets minimum and maximum points of scene bounding box for Graduated Trihedron stored in graphic view object. More...
 
 DEFINE_STANDARD_RTTIEXT (OpenGl_View, Graphic3d_CView) friend class OpenGl_GraphicDriver
 Result of RT/PT shaders initialization. More...
 
- Public Member Functions inherited from Graphic3d_CView
 Graphic3d_CView (const Handle< Graphic3d_StructureManager > &theMgr)
 Constructor. More...
 
virtual ~Graphic3d_CView ()
 Destructor. More...
 
Standard_Integer Identification () const
 Returns the identification number of the view. More...
 
virtual void Activate ()
 Activates the view. Maps presentations defined within structure manager onto this view. More...
 
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(). More...
 
Standard_Boolean IsActive () const
 Returns the activity flag of the view. More...
 
Standard_Boolean IsRemoved () const
 Returns true if the view was removed. More...
 
virtual const Handle< Graphic3d_Camera > & Camera () const override
 Returns camera object of the view. More...
 
virtual void SetCamera (const Handle< Graphic3d_Camera > &theCamera)
 Sets camera used by the view. More...
 
Graphic3d_TypeOfShadingModel ShadingModel () const
 Returns default Shading Model of the view; Graphic3d_TypeOfShadingModel_Phong by default. More...
 
void SetShadingModel (Graphic3d_TypeOfShadingModel theModel)
 Sets default Shading Model of the view. Will throw an exception on attempt to set Graphic3d_TypeOfShadingModel_DEFAULT. More...
 
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. More...
 
void SetBackfacingModel (const Graphic3d_TypeOfBackfacingModel theModel)
 Sets backfacing model for the view. More...
 
Graphic3d_TypeOfVisualization VisualizationType () const
 Returns visualization type of the view. More...
 
void SetVisualizationType (const Graphic3d_TypeOfVisualization theType)
 Sets visualization type of the view. More...
 
void SetComputedMode (const Standard_Boolean theMode)
 Switches computed HLR mode in the view. More...
 
Standard_Boolean ComputedMode () const
 Returns the computed HLR mode state. More...
 
void ReCompute (const Handle< Graphic3d_Structure > &theStructure)
 Computes the new presentation of the structure displayed in this view with the type Graphic3d_TOS_COMPUTED. More...
 
void Update (const Graphic3d_ZLayerId theLayerId=Graphic3d_ZLayerId_UNKNOWN)
 Invalidates bounding box of specified ZLayerId. More...
 
void Compute ()
 Computes the new presentation of the structures displayed in this view with the type Graphic3d_TOS_COMPUTED. More...
 
Standard_Boolean ContainsFacet () const
 Returns Standard_True if one of the structures displayed in the view contains Polygons, Triangles or Quadrangles. More...
 
Standard_Boolean ContainsFacet (const Graphic3d_MapOfStructure &theSet) const
 Returns Standard_True if one of the structures in the set contains Polygons, Triangles or Quadrangles. More...
 
void DisplayedStructures (Graphic3d_MapOfStructure &theStructures) const
 Returns the set of structures displayed in this view. More...
 
virtual Standard_Integer NumberOfDisplayedStructures () const
 Returns number of displayed structures in the view. More...
 
const Handle< Graphic3d_NMapOfTransient > & HiddenObjects () const
 Returns map of objects hidden within this specific view (not viewer-wise). More...
 
Handle< Graphic3d_NMapOfTransient > & ChangeHiddenObjects ()
 Returns map of objects hidden within this specific view (not viewer-wise). More...
 
Standard_Boolean IsComputed (const Standard_Integer theStructId, Handle< Graphic3d_Structure > &theComputedStruct) const
 Returns Standard_True in case if the structure with the given <theStructId> is in list of structures to be computed and stores computed struct to <theComputedStruct>. More...
 
Bnd_Box MinMaxValues (const Graphic3d_MapOfStructure &theSet, const Standard_Boolean theToIncludeAuxiliary=Standard_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. More...
 
const Handle< Graphic3d_StructureManager > & StructureManager () const
 Returns the structure manager handle which manage structures associated with this view. More...
 
virtual void InvalidateZLayerBoundingBox (const Graphic3d_ZLayerId theLayerId)
 Returns the bounding box of all structures displayed in the Z layer. More...
 
Standard_Real ConsiderZoomPersistenceObjects ()
 Returns zoom-scale factor. More...
 
virtual void CopySettings (const 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. More...
 
const Graphic3d_RenderingParamsRenderingParams () const
 Returns current rendering parameters and effect settings. More...
 
Graphic3d_RenderingParamsChangeRenderingParams ()
 Returns reference to current rendering parameters and effect settings. More...
 
virtual Aspect_Background Background () const
 Returns background fill color. More...
 
virtual void SetBackground (const Aspect_Background &theBackground)
 Sets background fill color. More...
 
const Handle< Graphic3d_TextureMap > & BackgroundImage ()
 Returns background image texture map. More...
 
const Handle< Graphic3d_CubeMap > & BackgroundCubeMap () const
 Returns cubemap being set last time on background. More...
 
const Handle< Graphic3d_CubeMap > & IBLCubeMap () const
 Returns cubemap being set last time on background. More...
 
Graphic3d_TypeOfBackground BackgroundType () const
 Returns background type. More...
 
void SetBackgroundType (Graphic3d_TypeOfBackground theType)
 Sets background type. More...
 
const Handle< Graphic3d_TextureEnv > & TextureEnv () const
 Returns environment texture set for the view. More...
 
Standard_Real 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. More...
 
void SetUnitFactor (Standard_Real theFactor)
 Set unit scale factor. More...
 
const Handle< Aspect_XRSession > & XRSession () const
 Return XR session. More...
 
void SetXRSession (const Handle< Aspect_XRSession > &theSession)
 Set XR session. More...
 
bool IsActiveXR () const
 Return TRUE if there is active XR session. More...
 
virtual bool InitXR ()
 Initialize XR session. More...
 
virtual void ReleaseXR ()
 Release XR session. More...
 
virtual void ProcessXRInput ()
 Process input. More...
 
void SetupXRPosedCamera ()
 Compute PosedXRCamera() based on current XR head pose and make it active. More...
 
void UnsetXRPosedCamera ()
 Set current camera back to BaseXRCamera() and copy temporary modifications of PosedXRCamera(). Calls SynchronizeXRPosedToBaseCamera() beforehand. More...
 
const Handle< Graphic3d_Camera > & PosedXRCamera () const
 Returns transient XR camera position with tracked head orientation applied. More...
 
void SetPosedXRCamera (const Handle< Graphic3d_Camera > &theCamera)
 Sets transient XR camera position with tracked head orientation applied. More...
 
const Handle< Graphic3d_Camera > & BaseXRCamera () const
 Returns anchor camera definition (without tracked head orientation). More...
 
void SetBaseXRCamera (const Handle< Graphic3d_Camera > &theCamera)
 Sets anchor camera definition. More...
 
gp_Trsf PoseXRToWorld (const gp_Trsf &thePoseXR) const
 Convert XR pose to world space. More...
 
gp_Ax1 ViewAxisInWorld (const gp_Trsf &thePoseXR) const
 Returns view direction in the world space based on XR pose. More...
 
void SynchronizeXRBaseToPosedCamera ()
 Recomputes PosedXRCamera() based on BaseXRCamera() and head orientation. More...
 
void SynchronizeXRPosedToBaseCamera ()
 Checks if PosedXRCamera() has been modified since SetupXRPosedCamera() and copies these modifications to BaseXRCamera(). More...
 
void ComputeXRPosedCameraFromBase (Graphic3d_Camera &theCam, const gp_Trsf &theXRTrsf) const
 Compute camera position based on XR pose. More...
 
void ComputeXRBaseCameraFromPosed (const Graphic3d_Camera &theCamPosed, const gp_Trsf &thePoseTrsf)
 Update based camera from posed camera by applying reversed transformation. More...
 
void TurnViewXRCamera (const gp_Trsf &theTrsfTurn)
 Turn XR camera direction using current (head) eye position as anchor. More...
 
virtual const Graphic3d_GraduatedTrihedronGetGraduatedTrihedron ()
 Returns data of a graduated trihedron. More...
 
virtual void DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const override
 Dumps the content of me into the stream. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_TransientThis () 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. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Protected Member Functions

bool d3dInitLib ()
 Initialize the D3D library. More...
 
bool d3dInit ()
 Initialize Direct3D output device. More...
 
bool d3dReset ()
 Reset Direct3D output settings. Could be used to switch windowed/fullscreen modes. Use very carefully! Most objects should be released before and recreated after! More...
 
bool d3dCreateRenderTarget ()
 (Re-)create D3D surface. More...
 
void d3dBeginRender ()
 Starts the scene render. Clears the backbuffer and sets the device to start rendering to it. More...
 
void d3dEndRender ()
 Ends the scene render. More...
 
bool d3dSwap ()
 Presents to the screen. More...
 
- Protected Member Functions inherited from OpenGl_View
void initTextureEnv (const Handle< OpenGl_Context > &theContext)
 Initializes OpenGl resource for environment texture. More...
 
virtual bool prepareFrameBuffers (Graphic3d_Camera::Projection &theProj)
 Prepare frame buffers for rendering. More...
 
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. More...
 
virtual bool redrawImmediate (const Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadFbo, OpenGl_FrameBuffer *theDrawFbo, OpenGl_FrameBuffer *theOitAccumFbo, const Standard_Boolean theIsPartialUpdate=Standard_False)
 Redraws view for the given monographic camera projection, or left/right eye. More...
 
bool blitBuffers (OpenGl_FrameBuffer *theReadFbo, OpenGl_FrameBuffer *theDrawFbo, const Standard_Boolean theToFlip=Standard_False)
 Blit image from/to specified buffers. More...
 
void bindDefaultFbo (OpenGl_FrameBuffer *theCustomFbo=NULL)
 Setup default FBO. More...
 
Standard_Boolean checkPBRAvailability () const
 Checks whether PBR is available. More...
 
void updatePBREnvironment (const Handle< OpenGl_Context > &theCtx)
 Generates IBL maps used in PBR pipeline. If background cubemap is not set clears all IBL maps. More...
 
Standard_Boolean updateRaytraceGeometry (const RaytraceUpdateMode theMode, const Standard_Integer theViewId, const Handle< OpenGl_Context > &theGlContext)
 Updates 3D scene geometry for ray-tracing. More...
 
Standard_Boolean updateRaytraceLightSources (const OpenGl_Mat4 &theInvModelView, const Handle< OpenGl_Context > &theGlContext)
 Updates 3D scene light sources for ray-tracing. More...
 
Standard_Boolean toUpdateStructure (const OpenGl_Structure *theStructure)
 Checks to see if the OpenGL structure is modified. More...
 
Standard_Boolean addRaytraceStructure (const OpenGl_Structure *theStructure, const Handle< OpenGl_Context > &theGlContext)
 Adds OpenGL structure to ray-traced scene geometry. More...
 
Standard_Boolean addRaytraceGroups (const OpenGl_Structure *theStructure, const OpenGl_RaytraceMaterial &theStructMat, const Handle< TopLoc_Datum3D > &theTrsf, const Handle< OpenGl_Context > &theGlContext)
 Adds OpenGL groups to ray-traced scene geometry. More...
 
OpenGl_RaytraceMaterial convertMaterial (const OpenGl_Aspects *theAspect, const Handle< OpenGl_Context > &theGlContext)
 Creates ray-tracing material properties. More...
 
Handle< OpenGl_TriangleSetaddRaytracePrimitiveArray (const OpenGl_PrimitiveArray *theArray, const Standard_Integer theMatID, const OpenGl_Mat4 *theTrans)
 Adds OpenGL primitive array to ray-traced scene geometry. More...
 
Standard_Boolean addRaytraceVertexIndices (OpenGl_TriangleSet &theSet, const Standard_Integer theMatID, const Standard_Integer theCount, const Standard_Integer theOffset, const OpenGl_PrimitiveArray &theArray)
 Adds vertex indices from OpenGL primitive array to ray-traced scene geometry. More...
 
Standard_Boolean addRaytraceTriangleArray (OpenGl_TriangleSet &theSet, const Standard_Integer theMatID, const Standard_Integer theCount, const Standard_Integer theOffset, const Handle< Graphic3d_IndexBuffer > &theIndices)
 Adds OpenGL triangle array to ray-traced scene geometry. More...
 
Standard_Boolean addRaytraceTriangleFanArray (OpenGl_TriangleSet &theSet, const Standard_Integer theMatID, const Standard_Integer theCount, const Standard_Integer theOffset, const Handle< Graphic3d_IndexBuffer > &theIndices)
 Adds OpenGL triangle fan array to ray-traced scene geometry. More...
 
Standard_Boolean addRaytraceTriangleStripArray (OpenGl_TriangleSet &theSet, const Standard_Integer theMatID, const Standard_Integer theCount, const Standard_Integer theOffset, const Handle< Graphic3d_IndexBuffer > &theIndices)
 Adds OpenGL triangle strip array to ray-traced scene geometry. More...
 
Standard_Boolean addRaytraceQuadrangleArray (OpenGl_TriangleSet &theSet, const Standard_Integer theMatID, const Standard_Integer theCount, const Standard_Integer theOffset, const Handle< Graphic3d_IndexBuffer > &theIndices)
 Adds OpenGL quadrangle array to ray-traced scene geometry. More...
 
Standard_Boolean addRaytraceQuadrangleStripArray (OpenGl_TriangleSet &theSet, const Standard_Integer theMatID, const Standard_Integer theCount, const Standard_Integer theOffset, const Handle< Graphic3d_IndexBuffer > &theIndices)
 Adds OpenGL quadrangle strip array to ray-traced scene geometry. More...
 
Standard_Boolean addRaytracePolygonArray (OpenGl_TriangleSet &theSet, const Standard_Integer theMatID, const Standard_Integer theCount, const Standard_Integer theOffset, const Handle< Graphic3d_IndexBuffer > &theIndices)
 Adds OpenGL polygon array to ray-traced scene geometry. More...
 
Standard_Boolean uploadRaytraceData (const Handle< OpenGl_Context > &theGlContext)
 Uploads ray-trace data to the GPU. More...
 
TCollection_AsciiString generateShaderPrefix (const Handle< OpenGl_Context > &theGlContext) const
 Generates shader prefix based on current ray-tracing options. More...
 
Standard_Boolean safeFailBack (const TCollection_ExtendedString &theMessage, const Handle< OpenGl_Context > &theGlContext)
 Performs safe exit when shaders initialization fails. More...
 
Handle< OpenGl_ShaderObjectinitShader (const GLenum theType, const ShaderSource &theSource, const Handle< OpenGl_Context > &theGlContext)
 Loads and compiles shader object from specified source. More...
 
Handle< OpenGl_ShaderPrograminitProgram (const Handle< OpenGl_Context > &theGlContext, const Handle< OpenGl_ShaderObject > &theVertShader, const Handle< OpenGl_ShaderObject > &theFragShader, const TCollection_AsciiString &theName)
 Creates shader program from the given vertex and fragment shaders. More...
 
Standard_Boolean initRaytraceResources (const Standard_Integer theSizeX, const Standard_Integer theSizeY, const Handle< OpenGl_Context > &theGlContext)
 Initializes OpenGL/GLSL shader programs. More...
 
void releaseRaytraceResources (const Handle< OpenGl_Context > &theGlContext, const Standard_Boolean theToRebuild=Standard_False)
 Releases OpenGL/GLSL shader programs. More...
 
Standard_Boolean updateRaytraceBuffers (const Standard_Integer theSizeX, const Standard_Integer theSizeY, const Handle< OpenGl_Context > &theGlContext)
 Updates auxiliary OpenGL frame buffers. More...
 
void updateCamera (const OpenGl_Mat4 &theOrientation, const OpenGl_Mat4 &theViewMapping, OpenGl_Vec3 *theOrigins, OpenGl_Vec3 *theDirects, OpenGl_Mat4 &theView, OpenGl_Mat4 &theUnView)
 Generates viewing rays for corners of screen quad. (ray tracing; path tracing for orthographic camera) More...
 
void updatePerspCameraPT (const OpenGl_Mat4 &theOrientation, const OpenGl_Mat4 &theViewMapping, Graphic3d_Camera::Projection theProjection, OpenGl_Mat4 &theViewPr, OpenGl_Mat4 &theUnview, const int theWinSizeX, const int theWinSizeY)
 Generate viewing rays (path tracing, perspective camera). More...
 
void bindRaytraceTextures (const Handle< OpenGl_Context > &theGlContext, int theStereoView)
 Binds ray-trace textures to corresponding texture units. More...
 
void unbindRaytraceTextures (const Handle< OpenGl_Context > &theGlContext)
 Unbinds ray-trace textures from corresponding texture unit. More...
 
Standard_Boolean setUniformState (const Standard_Integer theProgramId, const Standard_Integer theSizeX, const Standard_Integer theSizeY, Graphic3d_Camera::Projection theProjection, const Handle< OpenGl_Context > &theGlContext)
 Sets uniform state for the given ray-tracing shader program. More...
 
Standard_Boolean runRaytraceShaders (const Standard_Integer theSizeX, const Standard_Integer theSizeY, Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, const Handle< OpenGl_Context > &theGlContext)
 Runs ray-tracing shader programs. More...
 
Standard_Boolean runRaytrace (const Standard_Integer theSizeX, const Standard_Integer theSizeY, Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, const Handle< OpenGl_Context > &theGlContext)
 Runs classical (Whitted-style) ray-tracing kernel. More...
 
Standard_Boolean runPathtrace (const Standard_Integer theSizeX, const Standard_Integer theSizeY, Graphic3d_Camera::Projection theProjection, const Handle< OpenGl_Context > &theGlContext)
 Runs path tracing (global illumination) kernel. More...
 
Standard_Boolean runPathtraceOut (Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, const Handle< OpenGl_Context > &theGlContext)
 Runs path tracing (global illumination) kernel. More...
 
Standard_Boolean raytrace (const Standard_Integer theSizeX, const Standard_Integer theSizeY, Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, const Handle< OpenGl_Context > &theGlContext)
 Redraws the window using OpenGL/GLSL ray-tracing or path tracing. More...
 
virtual void renderShadowMap (const Handle< OpenGl_ShadowMap > &theShadowMap)
 Renders the graphical contents of the view into the preprepared shadowmap framebuffer. More...
 
virtual void render (Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, OpenGl_FrameBuffer *theOitAccumFbo, const Standard_Boolean theToDrawImmediate)
 Renders the graphical contents of the view into the preprepared window or framebuffer. More...
 
virtual void renderScene (Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, OpenGl_FrameBuffer *theOitAccumFbo, const Standard_Boolean theToDrawImmediate)
 Renders the graphical scene. More...
 
virtual void drawBackground (const Handle< OpenGl_Workspace > &theWorkspace, Graphic3d_Camera::Projection theProjection)
 Draw background (gradient / image) More...
 
virtual void renderStructs (Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer *theReadDrawFbo, OpenGl_FrameBuffer *theOitAccumFbo, const Standard_Boolean theToDrawImmediate)
 Render set of structures presented in the view. More...
 
void renderTrihedron (const Handle< OpenGl_Workspace > &theWorkspace)
 Renders trihedron. More...
 
void renderFrameStats ()
 Renders frame statistics. More...
 
- Protected Member Functions inherited from Graphic3d_DataStructureManager
 Graphic3d_DataStructureManager ()
 Initializes the manager <me>. More...
 

Static Protected Member Functions

static TCollection_AsciiString d3dFormatError (const long theErrCode)
 Auxiliary method. More...
 

Protected Attributes

IDirect3D9 * myD3dLib
 Direct3D library instance. More...
 
IDirect3DDevice9 * myD3dDevice
 Direct3D device object. More...
 
NCollection_Handle< D3DPRESENT_PARAMETERSmyD3dParams
 parameters for created Direct3D device More...
 
unsigned int myRefreshRate
 refresh rate in fullscreen mode More...
 
bool myIsD3dEx
 D3dEx flag for WDDM. More...
 
Handle< D3DHost_FrameBuffermyD3dWglFbo
 D3D/WGL interop FBO. More...
 
- Protected Attributes inherited from OpenGl_View
Standard_Integer mySRgbState
 Two framebuffers (left and right views) store cached main presentation of the view (without presentation of immediate layers). More...
 
GLint myFboColorFormat
 sized format for color attachments More...
 
GLint myFboDepthFormat
 sized format for depth-stencil attachments More...
 
OpenGl_ColorFormats myFboOitColorConfig
 selected color format configuration for OIT color attachments More...
 
Handle< OpenGl_FrameBuffermyMainSceneFbos [2]
 Two framebuffers (left and right views) store cached main presentation of the view (without presentation of immediate layers). More...
 
Handle< OpenGl_FrameBuffermyMainSceneFbosOit [2]
 Additional buffers for transparent draw of main layer. More...
 
Handle< OpenGl_FrameBuffermyImmediateSceneFbos [2]
 Additional buffers for immediate layer in stereo mode. More...
 
Handle< OpenGl_FrameBuffermyImmediateSceneFbosOit [2]
 Additional buffers for transparency draw of immediate layer. More...
 
Handle< OpenGl_FrameBuffermyXrSceneFbo
 additional FBO (without MSAA) for submitting to XR More...
 
Handle< OpenGl_DepthPeelingmyDepthPeelingFbos
 additional buffers for depth peeling More...
 
Handle< OpenGl_ShadowMapArraymyShadowMaps
 additional FBOs for shadow map rendering More...
 
OpenGl_VertexBuffer myFullScreenQuad
 Vertices for full-screen quad rendering. More...
 
OpenGl_VertexBuffer myFullScreenQuadFlip
 Two framebuffers (left and right views) store cached main presentation of the view (without presentation of immediate layers). More...
 
Standard_Boolean myToFlipOutput
 Flag to draw result image upside-down. More...
 
unsigned int myFrameCounter
 redraw counter, for debugging More...
 
Standard_Boolean myHasFboBlit
 disable FBOs on failure More...
 
Standard_Boolean myToDisableOIT
 disable OIT on failure More...
 
Standard_Boolean myToDisableOITMSAA
 disable OIT with MSAA on failure More...
 
Standard_Boolean myToDisableMSAA
 disable MSAA after failure More...
 
Standard_Boolean myTransientDrawToFront
 optimization flag for immediate mode (to render directly to the front buffer) More...
 
Standard_Boolean myBackBufferRestored
 Two framebuffers (left and right views) store cached main presentation of the view (without presentation of immediate layers). More...
 
Standard_Boolean myIsImmediateDrawn
 flag indicates that immediate mode buffer contains some data More...
 
OpenGl_AspectsmyTextureParams
 Stores texture and its parameters for textured background. More...
 
OpenGl_AspectsmyCubeMapParams
 Stores cubemap and its parameters for cubemap background. More...
 
OpenGl_AspectsmyColoredQuadParams
 Stores parameters for gradient (corner mode) background. More...
 
OpenGl_BackgroundArraymyBackgrounds [Graphic3d_TypeOfBackground_NB]
 Array of primitive arrays of different background types. More...
 
Handle< OpenGl_TextureSetmyTextureEnv
 Stores texture and its parameters for textured background. More...
 
Handle< OpenGl_PBREnvironmentmyPBREnvironment
 manager of IBL maps used in PBR pipeline More...
 
PBREnvironmentState myPBREnvState
 state of PBR environment More...
 
Standard_Boolean myPBREnvRequest
 update PBR environment More...
 
OpenGl_GraphicDrivermyDriver
 main list of displayed structure, sorted by layers More...
 
Handle< OpenGl_WindowmyWindow
 main list of displayed structure, sorted by layers More...
 
Handle< OpenGl_WorkspacemyWorkspace
 main list of displayed structure, sorted by layers More...
 
Handle< OpenGl_CapsmyCaps
 main list of displayed structure, sorted by layers More...
 
Standard_Boolean myWasRedrawnGL
 main list of displayed structure, sorted by layers More...
 
Handle< Graphic3d_SequenceOfHClipPlanemyClipPlanes
 main list of displayed structure, sorted by layers More...
 
gp_XYZ myLocalOrigin
 main list of displayed structure, sorted by layers More...
 
Handle< OpenGl_FrameBuffermyFBO
 main list of displayed structure, sorted by layers More...
 
Standard_Boolean myToShowGradTrihedron
 main list of displayed structure, sorted by layers More...
 
Graphic3d_GraduatedTrihedron myGTrihedronData
 main list of displayed structure, sorted by layers More...
 
Handle< Graphic3d_LightSetmyNoShadingLight
 main list of displayed structure, sorted by layers More...
 
Handle< Graphic3d_LightSetmyLights
 main list of displayed structure, sorted by layers More...
 
OpenGl_LayerList myZLayers
 main list of displayed structure, sorted by layers More...
 
Graphic3d_WorldViewProjState myWorldViewProjState
 camera modification state More...
 
OpenGl_StateCountermyStateCounter
 main list of displayed structure, sorted by layers More...
 
Standard_Size myCurrLightSourceState
 main list of displayed structure, sorted by layers More...
 
Standard_Size myLightsRevision
 main list of displayed structure, sorted by layers More...
 
StateInfo myLastOrientationState
 main list of displayed structure, sorted by layers More...
 
StateInfo myLastViewMappingState
 main list of displayed structure, sorted by layers More...
 
StateInfo myLastLightSourceState
 main list of displayed structure, sorted by layers More...
 
Graphic3d_CullingTool myBVHSelector
 Is needed for selection of overlapping objects and storage of the current view volume. More...
 
OpenGl_GraduatedTrihedron myGraduatedTrihedron
 main list of displayed structure, sorted by layers More...
 
OpenGl_FrameStatsPrs myFrameStatsPrs
 main list of displayed structure, sorted by layers More...
 
Handle< OpenGl_FrameBuffermyOpenGlFBO
 Framebuffers for OpenGL output. More...
 
Handle< OpenGl_FrameBuffermyOpenGlFBO2
 main list of displayed structure, sorted by layers More...
 
RaytraceInitStatus myRaytraceInitStatus
 Result of RT/PT shaders initialization. More...
 
Standard_Boolean myIsRaytraceDataValid
 Is ray-tracing geometry data valid? More...
 
Standard_Boolean myIsRaytraceWarnTextures
 True if warning about missing extension GL_ARB_bindless_texture has been displayed. More...
 
OpenGl_RaytraceGeometry myRaytraceGeometry
 3D scene geometry data for ray-tracing. More...
 
opencascade::handle< BVH_Builder< Standard_ShortReal, 3 > > myRaytraceBVHBuilder
 Builder for triangle set. More...
 
RaytracingParams myRaytraceParameters
 Compile-time ray-tracing parameters. More...
 
Standard_ShortReal myRaytraceSceneRadius
 Radius of bounding sphere of the scene. More...
 
Standard_ShortReal myRaytraceSceneEpsilon
 Scene epsilon to prevent self-intersections. More...
 
ShaderSource myRaytraceShaderSource
 OpenGL/GLSL source of ray-tracing fragment shader. More...
 
ShaderSource myPostFSAAShaderSource
 OpenGL/GLSL source of adaptive-AA fragment shader. More...
 
ShaderSource myOutImageShaderSource
 OpenGL/GLSL source of RT/PT display fragment shader. More...
 
Handle< OpenGl_ShaderObjectmyRaytraceShader
 OpenGL/GLSL ray-tracing fragment shader. More...
 
Handle< OpenGl_ShaderObjectmyPostFSAAShader
 OpenGL/GLSL adaptive-AA fragment shader. More...
 
Handle< OpenGl_ShaderObjectmyOutImageShader
 OpenGL/GLSL ray-tracing display fragment shader. More...
 
Handle< OpenGl_ShaderProgrammyRaytraceProgram
 OpenGL/GLSL ray-tracing shader program. More...
 
Handle< OpenGl_ShaderProgrammyPostFSAAProgram
 OpenGL/GLSL adaptive-AA shader program. More...
 
Handle< OpenGl_ShaderProgrammyOutImageProgram
 OpenGL/GLSL program for displaying texture. More...
 
Handle< OpenGl_TextureBuffermySceneNodeInfoTexture
 Texture buffer of data records of bottom-level BVH nodes. More...
 
Handle< OpenGl_TextureBuffermySceneMinPointTexture
 Texture buffer of minimum points of bottom-level BVH nodes. More...
 
Handle< OpenGl_TextureBuffermySceneMaxPointTexture
 Texture buffer of maximum points of bottom-level BVH nodes. More...
 
Handle< OpenGl_TextureBuffermySceneTransformTexture
 Texture buffer of transformations of high-level BVH nodes. More...
 
Handle< OpenGl_TextureBuffermyGeometryVertexTexture
 Texture buffer of vertex coords. More...
 
Handle< OpenGl_TextureBuffermyGeometryNormalTexture
 Texture buffer of vertex normals. More...
 
Handle< OpenGl_TextureBuffermyGeometryTexCrdTexture
 Texture buffer of vertex UV coords. More...
 
Handle< OpenGl_TextureBuffermyGeometryTriangTexture
 Texture buffer of triangle indices. More...
 
Handle< OpenGl_TextureBuffermyRaytraceMaterialTexture
 Texture buffer of material properties. More...
 
Handle< OpenGl_TextureBuffermyRaytraceLightSrcTexture
 Texture buffer of light source properties. More...
 
Handle< OpenGl_FrameBuffermyRaytraceFBO1 [2]
 1st framebuffer (FBO) to perform adaptive FSAA. Used in compatibility mode (no adaptive sampling). More...
 
Handle< OpenGl_FrameBuffermyRaytraceFBO2 [2]
 2nd framebuffer (FBO) to perform adaptive FSAA. Used in compatibility mode (no adaptive sampling). More...
 
Handle< OpenGl_TexturemyRaytraceOutputTexture [2]
 Output textures (2 textures are used in stereo mode). Used if adaptive screen sampling is activated. More...
 
Handle< OpenGl_TexturemyRaytraceVisualErrorTexture [2]
 Texture containing per-tile visual error estimation (2 textures are used in stereo mode). Used if adaptive screen sampling is activated. More...
 
Handle< OpenGl_TexturemyRaytraceTileOffsetsTexture [2]
 Texture containing offsets of sampled screen tiles (2 textures are used in stereo mode). Used if adaptive screen sampling is activated. More...
 
Handle< OpenGl_TexturemyRaytraceTileSamplesTexture [2]
 Texture containing amount of extra per-tile samples (2 textures are used in stereo mode). Used if adaptive screen sampling is activated. More...
 
OpenGl_VertexBuffer myRaytraceScreenQuad
 Vertex buffer (VBO) for drawing dummy quad. More...
 
Standard_Integer myUniformLocations [2][OpenGl_RT_NbVariables]
 Cached locations of frequently used uniform variables. More...
 
std::map< const OpenGl_Structure *, StructStatemyStructureStates
 State of OpenGL structures reflected to ray-tracing. More...
 
std::map< Standard_Size, OpenGl_TriangleSet * > myArrayToTrianglesMap
 PrimitiveArray to TriangleSet map for scene partial update. More...
 
std::set< Standard_IntegermyNonRaytraceStructureIDs
 Set of IDs of non-raytracable elements (to detect updates). More...
 
Standard_Boolean myToUpdateEnvironmentMap
 Marks if environment map should be updated. More...
 
Standard_Size myRaytraceLayerListState
 State of OpenGL layer list. More...
 
Standard_Integer myAccumFrames
 Number of accumulated frames (for progressive rendering). More...
 
OpenGl_Vec3 myPreviousOrigins [3]
 Stored ray origins used for detection of camera movements. More...
 
math_BullardGenerator myRNG
 Bullard RNG to produce random sequence. More...
 
OpenGl_TileSampler myTileSampler
 Tool object for sampling screen tiles in PT mode. More...
 
OpenGl_Vec3 myEyeOrig
 Camera position used for projective mode. More...
 
OpenGl_Vec3 myEyeView
 Camera view direction used for projective mode. More...
 
OpenGl_Vec3 myEyeVert
 Camera's screen vertical direction used for projective mode. More...
 
OpenGl_Vec3 myEyeSide
 Camera's screen horizontal direction used for projective mode. More...
 
OpenGl_Vec2 myEyeSize
 Camera's screen size used for projective mode. More...
 
float myPrevCameraApertureRadius
 Aperture radius of camera on previous frame used for depth-of-field (path tracing) More...
 
float myPrevCameraFocalPlaneDist
 Focal distance of camera on previous frame used for depth-of-field (path tracing) More...
 
- Protected Attributes inherited from Graphic3d_CView
Standard_Integer myId
 Cubemap displayed at background. More...
 
Graphic3d_RenderingParams myRenderParams
 Cubemap displayed at background. More...
 
Quantity_ColorRGBA myBgColor
 Cubemap displayed at background. More...
 
Handle< Graphic3d_TextureMapmyBackgroundImage
 Cubemap displayed at background. More...
 
Handle< Graphic3d_CubeMapmyCubeMapBackground
 Cubemap displayed at background. More...
 
Handle< Graphic3d_CubeMapmyCubeMapIBL
 Cubemap used for environment lighting. More...
 
Handle< Graphic3d_TextureEnvmyTextureEnvData
 Cubemap displayed at background. More...
 
Graphic3d_TypeOfBackground myBackgroundType
 Current type of background. More...
 
Handle< Graphic3d_StructureManagermyStructureManager
 Cubemap displayed at background. More...
 
Handle< Graphic3d_CameramyCamera
 Cubemap displayed at background. More...
 
Graphic3d_SequenceOfStructure myStructsToCompute
 Cubemap displayed at background. More...
 
Graphic3d_SequenceOfStructure myStructsComputed
 Cubemap displayed at background. More...
 
Graphic3d_MapOfStructure myStructsDisplayed
 Cubemap displayed at background. More...
 
Handle< Graphic3d_NMapOfTransientmyHiddenObjects
 Cubemap displayed at background. More...
 
Standard_Boolean myIsInComputedMode
 Cubemap displayed at background. More...
 
Standard_Boolean myIsActive
 Cubemap displayed at background. More...
 
Standard_Boolean myIsRemoved
 Cubemap displayed at background. More...
 
Graphic3d_TypeOfBackfacingModel myBackfacing
 Cubemap displayed at background. More...
 
Graphic3d_TypeOfVisualization myVisualization
 Cubemap displayed at background. More...
 
Handle< Aspect_XRSessionmyXRSession
 Cubemap displayed at background. More...
 
Handle< Graphic3d_CameramyBackXRCamera
 camera projection parameters to restore after closing XR session (FOV, aspect and similar) More...
 
Handle< Graphic3d_CameramyBaseXRCamera
 neutral camera orientation defining coordinate system in which head tracking is defined More...
 
Handle< Graphic3d_CameramyPosedXRCamera
 transient XR camera orientation with tracked head orientation applied (based on myBaseXRCamera) More...
 
Handle< Graphic3d_CameramyPosedXRCameraCopy
 neutral camera orientation copy at the beginning of processing input More...
 
Standard_Real myUnitFactor
 unit scale factor defined as scale factor for m (meters) More...
 
Graphic3d_GraduatedTrihedron myGTrihedronData
 Cubemap displayed at background. More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 
- Protected Types inherited from OpenGl_View
enum  PBREnvironmentState { OpenGl_PBREnvState_NONEXISTENT , OpenGl_PBREnvState_UNAVAILABLE , OpenGl_PBREnvState_CREATED }
 State of PBR environment. More...
 
enum  RaytraceInitStatus { OpenGl_RT_NONE , OpenGl_RT_INIT , OpenGl_RT_FAIL }
 Result of OpenGL shaders initialization. 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...
 
typedef std::pair< Standard_Size, Standard_SizeStateInfo
 main list of displayed structure, sorted by layers More...
 
- Static Protected Attributes inherited from OpenGl_View
static const Standard_Integer THE_DEFAULT_NB_BOUNCES = 3
 Default ray-tracing depth. More...
 
static const Standard_Integer THE_DEFAULT_STACK_SIZE = 10
 Default size of traversal stack. More...
 

Detailed Description

The D3D host view implementation that overrides rendering methods.

Constructor & Destructor Documentation

◆ D3DHost_View()

D3DHost_View::D3DHost_View ( const Handle< Graphic3d_StructureManager > &  theMgr,
const Handle< D3DHost_GraphicDriver > &  theDriver,
const Handle< OpenGl_Caps > &  theCaps,
OpenGl_StateCounter theCounter 
)

Constructor.

◆ ~D3DHost_View()

virtual D3DHost_View::~D3DHost_View ( )
virtual

Default destructor.

Member Function Documentation

◆ d3dBeginRender()

void D3DHost_View::d3dBeginRender ( )
protected

Starts the scene render. Clears the backbuffer and sets the device to start rendering to it.

◆ D3dColorSurface()

IDirect3DSurface9* D3DHost_View::D3dColorSurface ( ) const

Return D3D surface.

◆ d3dCreateRenderTarget()

bool D3DHost_View::d3dCreateRenderTarget ( )
protected

(Re-)create D3D surface.

◆ D3dDevice()

IDirect3DDevice9* D3DHost_View::D3dDevice ( ) const
inline

Access Direct3D device instance.

◆ d3dEndRender()

void D3DHost_View::d3dEndRender ( )
protected

Ends the scene render.

◆ d3dFormatError()

static TCollection_AsciiString D3DHost_View::d3dFormatError ( const long  theErrCode)
staticprotected

Auxiliary method.

◆ d3dInit()

bool D3DHost_View::d3dInit ( )
protected

Initialize Direct3D output device.

◆ d3dInitLib()

bool D3DHost_View::d3dInitLib ( )
protected

Initialize the D3D library.

◆ d3dReset()

bool D3DHost_View::d3dReset ( )
protected

Reset Direct3D output settings. Could be used to switch windowed/fullscreen modes. Use very carefully! Most objects should be released before and recreated after!

◆ d3dSwap()

bool D3DHost_View::d3dSwap ( )
protected

Presents to the screen.

◆ D3dWglBuffer()

const Handle< D3DHost_FrameBuffer >& D3DHost_View::D3dWglBuffer ( ) const
inline

Return D3D/WGL FBO.

◆ DiagnosticInformation()

virtual void D3DHost_View::DiagnosticInformation ( TColStd_IndexedDataMapOfStringString theDict,
Graphic3d_DiagnosticInfo  theFlags 
) const
overridevirtual

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

Reimplemented from OpenGl_View.

◆ isD3dEx()

bool D3DHost_View::isD3dEx ( ) const
inline
Returns
true if IDirect3DDevice9Ex device has been created

◆ Redraw()

virtual void D3DHost_View::Redraw ( )
overridevirtual

Redraw the all content.

Reimplemented from OpenGl_View.

◆ RedrawImmediate()

virtual void D3DHost_View::RedrawImmediate ( )
overridevirtual

Redraw only immediate layer.

Reimplemented from OpenGl_View.

◆ ReleaseGlResources()

virtual void D3DHost_View::ReleaseGlResources ( const Handle< OpenGl_Context > &  theCtx)
overridevirtual

Release OpenGL resources.

Reimplemented from OpenGl_View.

◆ Resized()

virtual void D3DHost_View::Resized ( )
overridevirtual

Resizes the window.

Reimplemented from OpenGl_View.

◆ SetWindow()

virtual void D3DHost_View::SetWindow ( const Handle< Aspect_Window > &  theWindow,
const Aspect_RenderingContext  theContext 
)
overridevirtual

Creates and maps rendering window to the view.

Parameters
theWindow[in] the window.
theContext[in] the rendering context. If NULL the context will be created internally.
theDisplayCB[in] the display callback function. If is not a NULL value, then the callback will be invoked at the end of the OCC graphic traversal and just before the swap of buffers.
theClientData[in] the client data for the callback.

Reimplemented from OpenGl_View.

Field Documentation

◆ myD3dDevice

IDirect3DDevice9* D3DHost_View::myD3dDevice
protected

Direct3D device object.

◆ myD3dLib

IDirect3D9* D3DHost_View::myD3dLib
protected

Direct3D library instance.

◆ myD3dParams

NCollection_Handle<D3DPRESENT_PARAMETERS> D3DHost_View::myD3dParams
protected

parameters for created Direct3D device

◆ myD3dWglFbo

Handle< D3DHost_FrameBuffer > D3DHost_View::myD3dWglFbo
protected

D3D/WGL interop FBO.

◆ myIsD3dEx

bool D3DHost_View::myIsD3dEx
protected

D3dEx flag for WDDM.

◆ myRefreshRate

unsigned int D3DHost_View::myRefreshRate
protected

refresh rate in fullscreen mode


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