|
| | D3DHost_FrameBuffer () |
| | Empty constructor.
|
| |
| | ~D3DHost_FrameBuffer () |
| | Destructor, should be called after Release().
|
| |
| virtual void | Release (OpenGl_Context *theCtx) override |
| | Releases D3D and OpenGL resources.
|
| |
| bool | Init (const occ::handle< OpenGl_Context > &theCtx, IDirect3DDevice9 *theD3DDevice, const bool theIsD3dEx, const int theSizeX, const int theSizeY) |
| | Initializes OpenGL FBO for Direct3D interoperability or in fallback mode. Color pixel format is always GL_RGBA8/D3DFMT_X8R8G8B8, no MSAA; depth-stencil pixel format is GL_DEPTH24_STENCIL8.
|
| |
| bool | InitD3dInterop (const occ::handle< OpenGl_Context > &theCtx, IDirect3DDevice9 *theD3DDevice, const bool theIsD3dEx, const int theSizeX, const int theSizeY, const int theDepthFormat) |
| | Initializes OpenGL FBO for Direct3D interoperability. Color pixel format is always GL_RGBA8/D3DFMT_X8R8G8B8, no MSAA.
|
| |
| bool | InitD3dFallback (const occ::handle< OpenGl_Context > &theCtx, IDirect3DDevice9 *theD3DDevice, const bool theIsD3dEx, const int theSizeX, const int theSizeY, const int theDepthFormat) |
| | Initializes OpenGL FBO + Direct3D surface for copying memory using fallback. Color pixel format is always GL_RGBA8/D3DFMT_X8R8G8B8, no MSAA.
|
| |
| bool | registerD3dBuffer (const occ::handle< OpenGl_Context > &theCtx) |
| | Binds Direct3D color buffer to OpenGL texture.
|
| |
| virtual void | BindBuffer (const occ::handle< OpenGl_Context > &theCtx) override |
| | Binds Direct3D objects for OpenGL drawing. Should be called before LockSurface() and followed by UnlockSurface();.
|
| |
| virtual void | LockSurface (const occ::handle< OpenGl_Context > &theCtx) |
| | Acquires D3D resource for OpenGL usage.
|
| |
| virtual void | UnlockSurface (const occ::handle< OpenGl_Context > &theCtx) |
| | Releases D3D resource.
|
| |
| IDirect3DSurface9 * | D3dColorSurface () |
| | Returns D3D surface used as color buffer.
|
| |
| void * | D3dColorSurfaceShare () |
| | Returns WDDM handle for D3D color surface.
|
| |
| bool | D3dFallback () const |
| | Returns TRUE if FBO has been initialized without WGL/D3D interop.
|
| |
| bool | IsSRGBReady () const |
| | Returns TRUE if color buffer is sRGB ready; FALSE by default. Requires D3DSAMP_SRGBTEXTURE sampler parameter being set on D3D level for rendering D3D surface.
|
| |
| void | SetSRGBReady (bool theIsReady) |
| | Set if color buffer is sRGB ready.
|
| |
| | OpenGl_FrameBuffer (const TCollection_AsciiString &theResourceId=TCollection_AsciiString::EmptyString()) |
| | Empty constructor.
|
| |
| | ~OpenGl_FrameBuffer () override |
| | Destructor.
|
| |
| void | Release (OpenGl_Context *theGlCtx) override |
| | Destroy object - will release GPU memory if any.
|
| |
| int | NbSamples () const |
| | Number of multisampling samples.
|
| |
| int | NbColorBuffers () const |
| | Number of color buffers.
|
| |
| bool | HasColor () const |
| | Return true if FBO has been created with color attachment.
|
| |
| bool | HasDepth () const |
| | Return true if FBO has been created with depth attachment.
|
| |
| NCollection_Vec2< int > | GetSize () const |
| | Return textures width x height.
|
| |
| int | GetSizeX () const |
| | Textures width.
|
| |
| int | GetSizeY () const |
| | Textures height.
|
| |
| NCollection_Vec2< int > | GetVPSize () const |
| | Return viewport width x height.
|
| |
| int | GetVPSizeX () const |
| | Viewport width.
|
| |
| int | GetVPSizeY () const |
| | Viewport height.
|
| |
| NCollection_Vec2< int > | GetInitVPSize () const |
| | Return viewport width x height.
|
| |
| int | GetInitVPSizeX () const |
| | Viewport width.
|
| |
| int | GetInitVPSizeY () const |
| | Viewport height.
|
| |
| bool | IsValid () const |
| | Returns true if current object was initialized.
|
| |
| bool | Init (const occ::handle< OpenGl_Context > &theGlCtx, const NCollection_Vec2< int > &theSize, const NCollection_DynamicArray< int > &theColorFormats, const occ::handle< OpenGl_Texture > &theDepthStencilTexture, const int theNbSamples=0) |
| | Initialize FBO for rendering into single/multiple color buffer and depth textures.
|
| |
| bool | Init (const occ::handle< OpenGl_Context > &theGlCtx, const NCollection_Vec2< int > &theSize, const int theColorFormat, const int theDepthFormat, const int theNbSamples=0) |
| | Initialize FBO for rendering into textures.
|
| |
| bool | Init (const occ::handle< OpenGl_Context > &theGlCtx, const NCollection_Vec2< int > &theSize, const NCollection_DynamicArray< int > &theColorFormats, const int theDepthFormat, const int theNbSamples=0) |
| | Initialize FBO for rendering into single/multiple color buffer and depth textures.
|
| |
| bool | InitLazy (const occ::handle< OpenGl_Context > &theGlCtx, const NCollection_Vec2< int > &theViewportSize, const int theColorFormat, const int theDepthFormat, const int theNbSamples=0) |
| | (Re-)initialize FBO with specified dimensions.
|
| |
| bool | InitLazy (const occ::handle< OpenGl_Context > &theGlCtx, const NCollection_Vec2< int > &theViewportSize, const NCollection_DynamicArray< int > &theColorFormats, const int theDepthFormat, const int theNbSamples=0) |
| | (Re-)initialize FBO with specified dimensions.
|
| |
| bool | InitLazy (const occ::handle< OpenGl_Context > &theGlCtx, const OpenGl_FrameBuffer &theFbo, const bool theToKeepMsaa=true) |
| | (Re-)initialize FBO with properties taken from another FBO.
|
| |
| bool | InitRenderBuffer (const occ::handle< OpenGl_Context > &theGlCtx, const NCollection_Vec2< int > &theSize, const NCollection_DynamicArray< int > &theColorFormats, const int theDepthFormat, const int theNbSamples=0) |
| | (Re-)initialize FBO with specified dimensions. The Render Buffer Objects will be used for Color, Depth and Stencil attachments (as opposite to textures).
|
| |
| bool | InitWithRB (const occ::handle< OpenGl_Context > &theGlCtx, const NCollection_Vec2< int > &theSize, const int theColorFormat, const int theDepthFormat, const unsigned int theColorRBufferFromWindow) |
| | (Re-)initialize FBO with specified dimensions. The Render Buffer Objects will be used for Color, Depth and Stencil attachments (as opposite to textures).
|
| |
| bool | InitWrapper (const occ::handle< OpenGl_Context > &theGlCtx) |
| | Initialize class from currently bound FBO. Retrieved OpenGL objects will not be destroyed on Release.
|
| |
| bool | InitWrapper (const occ::handle< OpenGl_Context > &theGlContext, const NCollection_Sequence< occ::handle< OpenGl_Texture > > &theColorTextures, const occ::handle< OpenGl_Texture > &theDepthTexture=occ::handle< OpenGl_Texture >()) |
| | Wrap existing color textures.
|
| |
| void | SetupViewport (const occ::handle< OpenGl_Context > &theGlCtx) |
| | Setup viewport to render into FBO.
|
| |
| void | ChangeViewport (const int theVPSizeX, const int theVPSizeY) |
| | Override viewport settings.
|
| |
| virtual void | BindDrawBuffer (const occ::handle< OpenGl_Context > &theGlCtx) |
| | Bind frame buffer for drawing GL_DRAW_FRAMEBUFFER (to render into the texture).
|
| |
| virtual void | BindReadBuffer (const occ::handle< OpenGl_Context > &theGlCtx) |
| | Bind frame buffer for reading GL_READ_FRAMEBUFFER.
|
| |
| virtual void | UnbindBuffer (const occ::handle< OpenGl_Context > &theGlCtx) |
| | Unbind frame buffer.
|
| |
| const occ::handle< OpenGl_Texture > & | ColorTexture (const int theColorBufferIndex=0) const |
| | Returns the color texture for the given color buffer index.
|
| |
| const occ::handle< OpenGl_Texture > & | DepthStencilTexture () const |
| | Returns the depth-stencil texture.
|
| |
| bool | IsColorRenderBuffer () const |
| | Returns TRUE if color Render Buffer is defined.
|
| |
| unsigned int | ColorRenderBuffer () const |
| | Returns the color Render Buffer.
|
| |
| bool | IsDepthStencilRenderBuffer () const |
| | Returns TRUE if depth Render Buffer is defined.
|
| |
| unsigned int | DepthStencilRenderBuffer () const |
| | Returns the depth Render Buffer.
|
| |
| size_t | EstimatedDataSize () const override |
| | Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules.
|
| |
| bool | initRenderBuffer (const occ::handle< OpenGl_Context > &theGlCtx, const NCollection_Vec2< int > &theSize, const NCollection_DynamicArray< int > &theColorFormats, const int theDepthFormat, const int theNbSamples, const unsigned int theColorRBufferFromWindow) |
| | (Re-)initialize FBO with specified dimensions. The Render Buffer Objects will be used for Color, Depth and Stencil attachments (as opposite to textures).
|
| |
| bool | Init (const occ::handle< OpenGl_Context > &theGlCtx, const int theSizeX, const int theSizeY, const NCollection_DynamicArray< int > &theColorFormats, const occ::handle< OpenGl_Texture > &theDepthStencilTexture, const int theNbSamples=0) |
| | Initialize FBO for rendering into single/multiple color buffer and depth textures.
|
| |
| bool | Init (const occ::handle< OpenGl_Context > &theGlCtx, const int theSizeX, const int theSizeY, const int theColorFormat, const int theDepthFormat, const int theNbSamples=0) |
| | Initialize FBO for rendering into textures.
|
| |
| bool | Init (const occ::handle< OpenGl_Context > &theGlCtx, const int theSizeX, const int theSizeY, const NCollection_DynamicArray< int > &theColorFormats, const int theDepthFormat, const int theNbSamples=0) |
| | Initialize FBO for rendering into single/multiple color buffer and depth textures.
|
| |
| bool | InitLazy (const occ::handle< OpenGl_Context > &theGlCtx, const int theViewportSizeX, const int theViewportSizeY, const int theColorFormat, const int theDepthFormat, const int theNbSamples=0) |
| | (Re-)initialize FBO with specified dimensions.
|
| |
| bool | InitLazy (const occ::handle< OpenGl_Context > &theGlCtx, const int theViewportSizeX, const int theViewportSizeY, const NCollection_DynamicArray< int > &theColorFormats, const int theDepthFormat, const int theNbSamples=0) |
| | (Re-)initialize FBO with specified dimensions.
|
| |
| bool | InitWithRB (const occ::handle< OpenGl_Context > &theGlCtx, const int theSizeX, const int theSizeY, const int theColorFormat, const int theDepthFormat, const unsigned int theColorRBufferFromWindow=0) |
| | (Re-)initialize FBO with specified dimensions. The Render Buffer Objects will be used for Color, Depth and Stencil attachments (as opposite to textures).
|
| |
| | OpenGl_NamedResource (const TCollection_AsciiString &theId) |
| | Empty constructor.
|
| |
| const TCollection_AsciiString & | ResourceId () const |
| | Return resource name.
|
| |
| | OpenGl_Resource () |
| | Empty constructor.
|
| |
| | ~OpenGl_Resource () override |
| | Destructor. Inheritors should call Clean (NULL) within it.
|
| |
| virtual void | DumpJson (Standard_OStream &theOStream, int theDepth=-1) const |
| | Dumps the content of me into the stream.
|
| |
Public Member Functions inherited from Standard_Transient |
| | Standard_Transient () |
| | Empty constructor.
|
| |
| | Standard_Transient (const Standard_Transient &) |
| | Copy constructor – does nothing.
|
| |
| Standard_Transient & | operator= (const Standard_Transient &) |
| | Assignment operator, needed to avoid copying reference counter.
|
| |
| virtual | ~Standard_Transient ()=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.
|
| |
Implements bridge FBO for direct rendering to Direct3D surfaces.