Class implements FrameBuffer Object (FBO) resource intended for off-screen rendering.
More...
|
| OpenGl_FrameBuffer (const TCollection_AsciiString &theResourceId=TCollection_AsciiString()) |
| Empty constructor.
|
|
virtual | ~OpenGl_FrameBuffer () |
| Destructor.
|
|
virtual void | Release (OpenGl_Context *theGlCtx) override |
| Destroy object - will release GPU memory if any.
|
|
Standard_Integer | NbSamples () const |
| Number of multisampling samples.
|
|
Standard_Integer | 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.
|
|
Graphic3d_Vec2i | GetSize () const |
| Return textures width x height.
|
|
Standard_Integer | GetSizeX () const |
| Textures width.
|
|
Standard_Integer | GetSizeY () const |
| Textures height.
|
|
Graphic3d_Vec2i | GetVPSize () const |
| Return viewport width x height.
|
|
Standard_Integer | GetVPSizeX () const |
| Viewport width.
|
|
Standard_Integer | GetVPSizeY () const |
| Viewport height.
|
|
Graphic3d_Vec2i | GetInitVPSize () const |
| Return viewport width x height.
|
|
Standard_Integer | GetInitVPSizeX () const |
| Viewport width.
|
|
Standard_Integer | GetInitVPSizeY () const |
| Viewport height.
|
|
Standard_Boolean | IsValid () const |
| Returns true if current object was initialized.
|
|
Standard_Boolean | Init (const Handle< OpenGl_Context > &theGlCtx, const Graphic3d_Vec2i &theSize, const OpenGl_ColorFormats &theColorFormats, const Handle< OpenGl_Texture > &theDepthStencilTexture, const Standard_Integer theNbSamples=0) |
| Initialize FBO for rendering into single/multiple color buffer and depth textures.
|
|
Standard_Boolean | Init (const Handle< OpenGl_Context > &theGlCtx, const Graphic3d_Vec2i &theSize, const Standard_Integer theColorFormat, const Standard_Integer theDepthFormat, const Standard_Integer theNbSamples=0) |
| Initialize FBO for rendering into textures.
|
|
Standard_Boolean | Init (const Handle< OpenGl_Context > &theGlCtx, const Graphic3d_Vec2i &theSize, const OpenGl_ColorFormats &theColorFormats, const Standard_Integer theDepthFormat, const Standard_Integer theNbSamples=0) |
| Initialize FBO for rendering into single/multiple color buffer and depth textures.
|
|
Standard_Boolean | InitLazy (const Handle< OpenGl_Context > &theGlCtx, const Graphic3d_Vec2i &theViewportSize, const Standard_Integer theColorFormat, const Standard_Integer theDepthFormat, const Standard_Integer theNbSamples=0) |
| (Re-)initialize FBO with specified dimensions.
|
|
Standard_Boolean | InitLazy (const Handle< OpenGl_Context > &theGlCtx, const Graphic3d_Vec2i &theViewportSize, const OpenGl_ColorFormats &theColorFormats, const Standard_Integer theDepthFormat, const Standard_Integer theNbSamples=0) |
| (Re-)initialize FBO with specified dimensions.
|
|
Standard_Boolean | InitLazy (const Handle< OpenGl_Context > &theGlCtx, const OpenGl_FrameBuffer &theFbo, const Standard_Boolean theToKeepMsaa=true) |
| (Re-)initialize FBO with properties taken from another FBO.
|
|
Standard_Boolean | InitRenderBuffer (const Handle< OpenGl_Context > &theGlCtx, const Graphic3d_Vec2i &theSize, const OpenGl_ColorFormats &theColorFormats, const Standard_Integer theDepthFormat, const Standard_Integer 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).
|
|
Standard_Boolean | InitWithRB (const Handle< OpenGl_Context > &theGlCtx, const Graphic3d_Vec2i &theSize, const Standard_Integer theColorFormat, const Standard_Integer 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).
|
|
Standard_Boolean | InitWrapper (const Handle< OpenGl_Context > &theGlCtx) |
| Initialize class from currently bound FBO. Retrieved OpenGL objects will not be destroyed on Release.
|
|
Standard_Boolean | InitWrapper (const Handle< OpenGl_Context > &theGlContext, const NCollection_Sequence< Handle< OpenGl_Texture > > &theColorTextures, const Handle< OpenGl_Texture > &theDepthTexture=Handle< OpenGl_Texture >()) |
| Wrap existing color textures.
|
|
void | SetupViewport (const Handle< OpenGl_Context > &theGlCtx) |
| Setup viewport to render into FBO.
|
|
void | ChangeViewport (const Standard_Integer theVPSizeX, const Standard_Integer theVPSizeY) |
| Override viewport settings.
|
|
virtual void | BindBuffer (const Handle< OpenGl_Context > &theGlCtx) |
| Bind frame buffer for drawing and reading (to render into the texture).
|
|
virtual void | BindDrawBuffer (const Handle< OpenGl_Context > &theGlCtx) |
| Bind frame buffer for drawing GL_DRAW_FRAMEBUFFER (to render into the texture).
|
|
virtual void | BindReadBuffer (const Handle< OpenGl_Context > &theGlCtx) |
| Bind frame buffer for reading GL_READ_FRAMEBUFFER.
|
|
virtual void | UnbindBuffer (const Handle< OpenGl_Context > &theGlCtx) |
| Unbind frame buffer.
|
|
const Handle< OpenGl_Texture > & | ColorTexture (const Standard_Integer theColorBufferIndex=0) const |
| Returns the color texture for the given color buffer index.
|
|
const 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.
|
|
virtual Standard_Size | EstimatedDataSize () const override |
| Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules.
|
|
Standard_Boolean | initRenderBuffer (const Handle< OpenGl_Context > &theGlCtx, const Graphic3d_Vec2i &theSize, const OpenGl_ColorFormats &theColorFormats, const Standard_Integer theDepthFormat, const Standard_Integer 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 Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theSizeX, const Standard_Integer theSizeY, const OpenGl_ColorFormats &theColorFormats, const Handle< OpenGl_Texture > &theDepthStencilTexture, const Standard_Integer theNbSamples=0) |
| Initialize FBO for rendering into single/multiple color buffer and depth textures.
|
|
bool | Init (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theSizeX, const Standard_Integer theSizeY, const Standard_Integer theColorFormat, const Standard_Integer theDepthFormat, const Standard_Integer theNbSamples=0) |
| Initialize FBO for rendering into textures.
|
|
bool | Init (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theSizeX, const Standard_Integer theSizeY, const OpenGl_ColorFormats &theColorFormats, const Standard_Integer theDepthFormat, const Standard_Integer theNbSamples=0) |
| Initialize FBO for rendering into single/multiple color buffer and depth textures.
|
|
bool | InitLazy (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theViewportSizeX, const Standard_Integer theViewportSizeY, const Standard_Integer theColorFormat, const Standard_Integer theDepthFormat, const Standard_Integer theNbSamples=0) |
| (Re-)initialize FBO with specified dimensions.
|
|
bool | InitLazy (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theViewportSizeX, const Standard_Integer theViewportSizeY, const OpenGl_ColorFormats &theColorFormats, const Standard_Integer theDepthFormat, const Standard_Integer theNbSamples=0) |
| (Re-)initialize FBO with specified dimensions.
|
|
bool | InitWithRB (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theSizeX, const Standard_Integer theSizeY, const Standard_Integer theColorFormat, const Standard_Integer 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.
|
|
virtual | ~OpenGl_Resource () |
| Destructor. Inheritors should call Clean (NULL) within it.
|
|
virtual void | DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const |
| Dumps the content of me into the stream.
|
|
Public Member Functions inherited from Standard_Transient |
| Standard_Transient () |
| Empty constructor.
|
|
| Standard_Transient (const Standard_Transient &) |
| Copy constructor – does nothing.
|
|
Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter.
|
|
virtual | ~Standard_Transient () |
| Destructor must be virtual.
|
|
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object.
|
|
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type.
|
|
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
| Returns a true value if this is an instance of TypeName.
|
|
Standard_Boolean | IsKind (const opencascade::handle< Standard_Type > &theType) const |
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
|
|
Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
|
|
Standard_Transient * | This () const |
| Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
|
|
Standard_Integer | GetRefCount () const noexcept |
| Get the reference counter of this object.
|
|
void | IncrementRefCounter () noexcept |
| Increments the reference counter of this object.
|
|
Standard_Integer | DecrementRefCounter () noexcept |
| Decrements the reference counter of this object; returns the decremented value.
|
|
virtual void | Delete () const |
| Memory deallocator for transient classes.
|
|
Class implements FrameBuffer Object (FBO) resource intended for off-screen rendering.