The IFrameBuffer graph node interface. More...

#include "murl_graph_i_frame_buffer.h"

Inheritance diagram for Murl::Graph::IFrameBuffer:

Public Member Functions

virtual INodeGetNodeInterface ()=0
 Get the mutable Graph::INode interface. More...
 
virtual const INodeGetNodeInterface () const =0
 Get the constant Graph::INode interface. More...
 
virtual ITextureNodeTargetGetColorTextureNodeTarget ()=0
 Get the mutable Graph::ITextureNodeTarget color buffer container. More...
 
virtual const ITextureNodeTargetGetColorTextureNodeTarget () const =0
 Get the constant Graph::ITextureNodeTarget color buffer container. More...
 
virtual ITextureNodeTargetGetDepthTextureNodeTarget ()=0
 Get the mutable Graph::ITextureNodeTarget depth buffer container. More...
 
virtual const ITextureNodeTargetGetDepthTextureNodeTarget () const =0
 Get the constant Graph::ITextureNodeTarget depth buffer container. More...
 
virtual ITextureNodeTargetGetStencilTextureNodeTarget ()=0
 Get the mutable Graph::ITextureNodeTarget stencil buffer container. More...
 
virtual const ITextureNodeTargetGetStencilTextureNodeTarget () const =0
 Get the constant Graph::ITextureNodeTarget stencil buffer container. More...
 
virtual Bool SetDepthBufferFormat (IEnums::DepthBufferFormat format)=0
 Explicitly set the format of the depth buffer. More...
 
virtual IEnums::DepthBufferFormat GetDepthBufferFormat () const =0
 Get the explicit depth buffer format. More...
 
virtual Bool SetStencilBufferFormat (IEnums::StencilBufferFormat format)=0
 Explicitly set the format of the stencil buffer. More...
 
virtual IEnums::StencilBufferFormat GetStencilBufferFormat () const =0
 Get the explicit stencil buffer format. More...
 
virtual Bool SetRendererOrientation (IEnums::Orientation orientation)=0
 Set the framebuffer's orientation. More...
 
virtual IEnums::Orientation GetRendererOrientation () const =0
 Get the framebuffer's orientation. More...
 
virtual Bool SetDelinearizationEnabled (Bool enabled)=0
 Enable/disable color de-linearization when writing to the color buffer, if available. More...
 
virtual Bool IsDelinearizationEnabled () const =0
 Check if color de-linearization during rendering is enabled. More...
 
virtual Bool SetMipMapGenerationEnabled (Bool enabled)=0
 Enable/disable automatic MIP map generation. More...
 
virtual Bool IsMipMapGenerationEnabled () const =0
 Check if automatic MIP map generation is enabled. More...
 
virtual Bool SetTargetLayer (UInt32 layer)=0
 Set the target texture layer when rendering to an array texture. More...
 
virtual UInt32 GetTargetLayer () const =0
 Get the target texture layer for rendering. More...
 
virtual Bool SetTargetMipLevel (UInt32 level)=0
 Set the target MIP level when rendering to (a) mip-mapped texture(s). More...
 
virtual UInt32 GetTargetMipLevel () const =0
 Get the target MIP level for rendering. More...
 
virtual Bool SetNumberOfSamples (UInt32 numSamples)=0
 Set the number of samples for multisample anti-aliasing. More...
 
virtual UInt32 GetNumberOfSamples () const =0
 Get the number of samples for multisample anti-aliasing. More...
 
virtual Bool SetSortOrder (SInt32 sortOrder)=0
 Set the frame buffers's absolute sort order. More...
 
virtual SInt32 GetSortOrder () const =0
 Get the frame buffers's global sort order. More...
 
virtual UInt32 GetSizeX () const =0
 Get the frame buffer width. More...
 
virtual UInt32 GetSizeY () const =0
 Get the frame buffer height. More...
 
virtual Bool SetInCoordSize (Real sizeX, Real sizeY)=0
 Set the input coordinate reference size. More...
 
virtual Bool SetInCoordSizeX (Real sizeX)=0
 Set the horizontal input coordinate reference size. More...
 
virtual Bool SetInCoordSizeY (Real sizeY)=0
 Set the vertical input coordinate reference size. More...
 
virtual Real GetInCoordSizeX () const =0
 Get the horizontal input coordinate reference size. More...
 
virtual Real GetInCoordSizeY () const =0
 Get the vertical input coordinate reference size. More...
 
virtual Bool SetInCoord (Real x1, Real y1, Real x2, Real y2)=0
 Set the frame buffer's input coordinate range. More...
 
virtual Bool SetInCoord1 (Real x1, Real y1)=0
 Set the frame buffer's input coordinate start. More...
 
virtual Bool SetInCoord2 (Real x2, Real y2)=0
 Set the frame buffer's input coordinate end. More...
 
virtual Bool SetInCoordX1 (Real x1)=0
 Set the frame buffer's horizontal start input coordinate. More...
 
virtual Bool SetInCoordY1 (Real y1)=0
 Set the frame buffer's vertical start input coordinates. More...
 
virtual Bool SetInCoordX2 (Real x2)=0
 Set the frame buffer's horizontal end input coordinate. More...
 
virtual Bool SetInCoordY2 (Real y2)=0
 Set the frame buffer's vertical end input coordinates. More...
 
virtual Real GetInCoordX1 () const =0
 Get the frame buffer's horizontal start input coordinate. More...
 
virtual Real GetInCoordY1 () const =0
 Get the frame buffer's vertical start input coordinate. More...
 
virtual Real GetInCoordX2 () const =0
 Get the frame buffer's horizontal end input coordinate. More...
 
virtual Real GetInCoordY2 () const =0
 Get the frame buffer's vertical end input coordinate. More...
 
virtual UInt32 GetNumberOfStages () const =0
 Get the frame buffer's number of stages. More...
 
virtual Video::IFrameBufferGetVideoFrameBufferObject (UInt32 stage) const =0
 Get the frame buffer's internal video renderer object. More...
 
virtual Input::IScreenAreaGetInputScreenAreaObject (UInt32 stage) const =0
 Get the frame buffer's internal input screen area object. More...
 

Detailed Description

The IFrameBuffer graph node interface.

Normally, all geometry contained in the scene graph gets rendered to the back buffer provided by the platform, which gets presented to the user once per frame. For certain purposes however, it can be necessary not to render directly to the back buffer but to an off-screen area:

  • Post-processing effects on the rendered scene
  • Dynamic reflections
  • Statically generated 2D backgrounds etc.

A frame buffer represents a render target to such an off-screen area. To be able to access the generated contents, a frame buffer must refer to at least one Graph::ITexture, which holds the generated image after rendering to the frame buffer is complete, and serves as the pixel input for a later render stage.

Depending on which information is actually needed for such a later stage, one or more different texture attachment points can be used for a given frame buffer, e.g. the color target texture receives actual RGBA pixel color values, and a depth target texture receives pixel depth values.

Often, only color values are needed later but the rendering process requires an active depth buffer for correct display. In such a case, it is not necessary to create and attach a depth texture; instead, it is sufficient to explicitly set a depth buffer format to create a depth buffer that is only used internally.

To use a frame buffer for rendering, one or more Graph::IView nodes must refer to this frame buffer; after activating a Graph::ICamera referring to such a view, all subsequent geometry is then rendered to that frame buffer, with the given view and camera settings.

Note, that when multiple textures are attached, all of these textures must have the same dimensions, or initialization will fail.

Member Function Documentation

◆ GetNodeInterface() [1/2]

virtual INode* Murl::Graph::IFrameBuffer::GetNodeInterface ( )
pure virtual

Get the mutable Graph::INode interface.

This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.

Returns
The mutable Graph::INode interface, or null if not available

◆ GetNodeInterface() [2/2]

virtual const INode* Murl::Graph::IFrameBuffer::GetNodeInterface ( ) const
pure virtual

Get the constant Graph::INode interface.

This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.

Returns
The constant Graph::INode interface, or null if not available

◆ GetColorTextureNodeTarget() [1/2]

virtual ITextureNodeTarget* Murl::Graph::IFrameBuffer::GetColorTextureNodeTarget ( )
pure virtual

Get the mutable Graph::ITextureNodeTarget color buffer container.

This method returns a mutable pointer to the node's Graph::ITextureNodeTarget container to set or query the referenced texture node used for storing the frame buffer's output color values.

Returns
The mutable Graph::ITextureNodeTarget color buffer container, or null if not available.

◆ GetColorTextureNodeTarget() [2/2]

virtual const ITextureNodeTarget* Murl::Graph::IFrameBuffer::GetColorTextureNodeTarget ( ) const
pure virtual

Get the constant Graph::ITextureNodeTarget color buffer container.

This method returns a constant pointer to the node's Graph::ITextureNodeTarget container to query the referenced texture node used for storing the frame buffer's output color values.

Returns
The constant Graph::ITextureNodeTarget color buffer container, or null if not available.

◆ GetDepthTextureNodeTarget() [1/2]

virtual ITextureNodeTarget* Murl::Graph::IFrameBuffer::GetDepthTextureNodeTarget ( )
pure virtual

Get the mutable Graph::ITextureNodeTarget depth buffer container.

This method returns a mutable pointer to the node's Graph::ITextureNodeTarget container to set or query the referenced texture node used for storing the frame buffer's output depth values.

Returns
The mutable Graph::ITextureNodeTarget depth buffer container, or null if not available.

◆ GetDepthTextureNodeTarget() [2/2]

virtual const ITextureNodeTarget* Murl::Graph::IFrameBuffer::GetDepthTextureNodeTarget ( ) const
pure virtual

Get the constant Graph::ITextureNodeTarget depth buffer container.

This method returns a constant pointer to the node's Graph::ITextureNodeTarget container to query the referenced texture node used for storing the frame buffer's output depth values.

Returns
The constant Graph::ITextureNodeTarget depth buffer container, or null if not available.

◆ GetStencilTextureNodeTarget() [1/2]

virtual ITextureNodeTarget* Murl::Graph::IFrameBuffer::GetStencilTextureNodeTarget ( )
pure virtual

Get the mutable Graph::ITextureNodeTarget stencil buffer container.

This method returns a mutable pointer to the node's Graph::ITextureNodeTarget container to set or query the referenced texture node used for storing the frame buffer's output stencil values.

Returns
The mutable Graph::ITextureNodeTarget stencil buffer container, or null if not available.

◆ GetStencilTextureNodeTarget() [2/2]

virtual const ITextureNodeTarget* Murl::Graph::IFrameBuffer::GetStencilTextureNodeTarget ( ) const
pure virtual

Get the constant Graph::ITextureNodeTarget stencil buffer container.

This method returns a constant pointer to the node's Graph::ITextureNodeTarget container to query the referenced texture node used for storing the frame buffer's output stencil values.

Returns
The constant Graph::ITextureNodeTarget stencil buffer container, or null if not available.

◆ SetDepthBufferFormat()

virtual Bool Murl::Graph::IFrameBuffer::SetDepthBufferFormat ( IEnums::DepthBufferFormat  format)
pure virtual

Explicitly set the format of the depth buffer.

If no texture is specified as a target for storing depth buffer values, the explicit depth buffer format is used to create an offscreen buffer. In that case, the depth buffer is only used for rendering internally and cannot be accessed from the outside.

Parameters
formatThe explicit depth buffer format.
Returns
true if successful.

◆ GetDepthBufferFormat()

virtual IEnums::DepthBufferFormat Murl::Graph::IFrameBuffer::GetDepthBufferFormat ( ) const
pure virtual

Get the explicit depth buffer format.

Returns
The explicit depth buffer format.

◆ SetStencilBufferFormat()

virtual Bool Murl::Graph::IFrameBuffer::SetStencilBufferFormat ( IEnums::StencilBufferFormat  format)
pure virtual

Explicitly set the format of the stencil buffer.

If no texture is specified as a target for storing stencil buffer values, the explicit stencil buffer format is used to create an offscreen buffer. In that case, the stencil buffer is only used for rendering internally and cannot be accessed from the outside.

Parameters
formatThe explicit stencil buffer format.
Returns
true if successful.

◆ GetStencilBufferFormat()

virtual IEnums::StencilBufferFormat Murl::Graph::IFrameBuffer::GetStencilBufferFormat ( ) const
pure virtual

Get the explicit stencil buffer format.

Returns
The explicit stencil buffer format.

◆ SetRendererOrientation()

virtual Bool Murl::Graph::IFrameBuffer::SetRendererOrientation ( IEnums::Orientation  orientation)
pure virtual

Set the framebuffer's orientation.

By default, the framebuffer has this value set to IEnums::ORIENTATION_ROTATE_0, so all views referring to this framebuffer as a render target will render their contents 'upright'. For certain cases, like post-processing in image space, it may be necessary that the framebuffer receives its contents in the same orientation as the back buffer. This can be achieved by calling this method with IEnums::ORIENTATION_DEFAULT.

Parameters
orientationOne of the four values NORMAL, ROTATE_CW, FLIP or ROTATE_CCW to define a fixed framebuffer orientation, or DEFAULT to select the main back buffer's orientation.
Returns
true if successful.

◆ GetRendererOrientation()

virtual IEnums::Orientation Murl::Graph::IFrameBuffer::GetRendererOrientation ( ) const
pure virtual

Get the framebuffer's orientation.

Returns
One of the four values NORMAL, ROTATE_CW, FLIP or ROTATE_CCW if the framebuffer has a fixed orientation, or DEFAULT if the main back buffer's orientation is used.

◆ SetDelinearizationEnabled()

virtual Bool Murl::Graph::IFrameBuffer::SetDelinearizationEnabled ( Bool  enabled)
pure virtual

Enable/disable color de-linearization when writing to the color buffer, if available.

By default, a fragment shader's color output RGB values are written to the output color buffer without any conversion. If the shader performs operations on linear color values and the target color buffer is a regular integer RGB(A) texture or render buffer, the output will be too dark, as the target color buffer expects gamma-corrected values. In this case, de-linearization should be enabled on the frame buffer, so that the usual gamma value of 2.2 is applied to the output pixels. Note, that floating point color buffers are always linear, so this has no effect.

Parameters
enabledIf true, color de-linearization is enabled.
Returns
true if successful.

◆ IsDelinearizationEnabled()

virtual Bool Murl::Graph::IFrameBuffer::IsDelinearizationEnabled ( ) const
pure virtual

Check if color de-linearization during rendering is enabled.

Returns
true if enabled.

◆ SetMipMapGenerationEnabled()

virtual Bool Murl::Graph::IFrameBuffer::SetMipMapGenerationEnabled ( Bool  enabled)
pure virtual

Enable/disable automatic MIP map generation.

Parameters
enabledIf true, automatic MIP map generation is enabled.
Returns
true if successful.

◆ IsMipMapGenerationEnabled()

virtual Bool Murl::Graph::IFrameBuffer::IsMipMapGenerationEnabled ( ) const
pure virtual

Check if automatic MIP map generation is enabled.

Returns
true if automatic MIP map generation is enabled.

◆ SetTargetLayer()

virtual Bool Murl::Graph::IFrameBuffer::SetTargetLayer ( UInt32  layer)
pure virtual

Set the target texture layer when rendering to an array texture.

By default, the output is rendered to layer 0. This value is ignored for non-array textures.

Parameters
layerThe target layer.
Returns
true if successful.

◆ GetTargetLayer()

virtual UInt32 Murl::Graph::IFrameBuffer::GetTargetLayer ( ) const
pure virtual

Get the target texture layer for rendering.

Returns
The MIP level.

◆ SetTargetMipLevel()

virtual Bool Murl::Graph::IFrameBuffer::SetTargetMipLevel ( UInt32  level)
pure virtual

Set the target MIP level when rendering to (a) mip-mapped texture(s).

By default, the output is rendered to a texture's base level, i.e. level=0. This value is ignored if automatic MIP map generation is enabled via SetMipMapGenerationEnabled().

Parameters
levelThe target MIP level.
Returns
true if successful.

◆ GetTargetMipLevel()

virtual UInt32 Murl::Graph::IFrameBuffer::GetTargetMipLevel ( ) const
pure virtual

Get the target MIP level for rendering.

Returns
The MIP level.

◆ SetNumberOfSamples()

virtual Bool Murl::Graph::IFrameBuffer::SetNumberOfSamples ( UInt32  numSamples)
pure virtual

Set the number of samples for multisample anti-aliasing.

By default, the number of samples is set to 1, i.e. multisampling is disabled. A value of 0 indicates that the global number of samples is to be used, which can be configured via IEngineConfiguration::SetNumberOfAntiAliasSamples(). A value greater than 1 enables multisampling for this frame buffer, with the given number of samples clamped to the maximum allowed value indicated by the GPU.

Parameters
numSamplesThe number of samples.
Returns
true if successful.

◆ GetNumberOfSamples()

virtual UInt32 Murl::Graph::IFrameBuffer::GetNumberOfSamples ( ) const
pure virtual

Get the number of samples for multisample anti-aliasing.

Returns
The number of samples.

◆ SetSortOrder()

virtual Bool Murl::Graph::IFrameBuffer::SetSortOrder ( SInt32  sortOrder)
pure virtual

Set the frame buffers's absolute sort order.

Frame buffers are generally processed in the order in which they receive drawables during rendering. If a frame buffer depends on another frame buffer, which should be updated before it is used, it is often desired to specify an explicit order in which the frame buffers are processed globally. Setting a higher sort order results in the frame buffer always being processed after all frame buffers with a lower order have been updated. Frame buffers with the same sort order are processed in the order in which they get filled with drawables. Note: The back buffer is always processed last.

Parameters
sortOrderThe global order of this frame buffer.
Returns
true if successful.

◆ GetSortOrder()

virtual SInt32 Murl::Graph::IFrameBuffer::GetSortOrder ( ) const
pure virtual

Get the frame buffers's global sort order.

Returns
The global order.

◆ GetSizeX()

virtual UInt32 Murl::Graph::IFrameBuffer::GetSizeX ( ) const
pure virtual

Get the frame buffer width.

Returns
The frame buffer width in pixels (texels).

◆ GetSizeY()

virtual UInt32 Murl::Graph::IFrameBuffer::GetSizeY ( ) const
pure virtual

Get the frame buffer height.

Returns
The frame buffer height in pixels (texels).

◆ SetInCoordSize()

virtual Bool Murl::Graph::IFrameBuffer::SetInCoordSize ( Real  sizeX,
Real  sizeY 
)
pure virtual

Set the input coordinate reference size.

Generally, input coordinates are represented by values ranging from -1.0 to 1.0. As a convenience, this method can be used to set an arbitrary reference size for both dimensions of the frame buffer; this way it is possible to specify integer (pixel) values instead of (quite unreadable) floats. By default, both sizeX and sizeY are set to 1.0. See also Graph::IButton::SetOutCoordSize() as the counterpart providing the actual input coordinates.

Parameters
sizeXThe horizontal coordinate reference size.
sizeYThe vertical coordinate reference size.
Returns
true if successful.

◆ SetInCoordSizeX()

virtual Bool Murl::Graph::IFrameBuffer::SetInCoordSizeX ( Real  sizeX)
pure virtual

Set the horizontal input coordinate reference size.

See SetInCoordSize().

Parameters
sizeXThe horizontal coordinate reference size.
Returns
true if successful.

◆ SetInCoordSizeY()

virtual Bool Murl::Graph::IFrameBuffer::SetInCoordSizeY ( Real  sizeY)
pure virtual

Set the vertical input coordinate reference size.

See SetInCoordSize().

Parameters
sizeYThe vertical coordinate reference size.
Returns
true if successful.

◆ GetInCoordSizeX()

virtual Real Murl::Graph::IFrameBuffer::GetInCoordSizeX ( ) const
pure virtual

Get the horizontal input coordinate reference size.

See SetInCoordSize().

Returns
The horizontal input coordinate reference size.

◆ GetInCoordSizeY()

virtual Real Murl::Graph::IFrameBuffer::GetInCoordSizeY ( ) const
pure virtual

Get the vertical input coordinate reference size.

See SetInCoordSize().

Returns
The vertical output coordinate reference size.

◆ SetInCoord()

virtual Bool Murl::Graph::IFrameBuffer::SetInCoord ( Real  x1,
Real  y1,
Real  x2,
Real  y2 
)
pure virtual

Set the frame buffer's input coordinate range.

This method sets the frame buffer's start and end input coordinates.

Parameters
x1The start coordinate in X direction.
y1The start coordinate in Y direction.
x2The end coordinate in X direction.
y2The end coordinate in Y direction.
Returns
true if successful.

◆ SetInCoord1()

virtual Bool Murl::Graph::IFrameBuffer::SetInCoord1 ( Real  x1,
Real  y1 
)
pure virtual

Set the frame buffer's input coordinate start.

See SetInCoord().

Parameters
x1The start coordinate in X direction.
y1The start coordinate in Y direction.
Returns
true if successful.

◆ SetInCoord2()

virtual Bool Murl::Graph::IFrameBuffer::SetInCoord2 ( Real  x2,
Real  y2 
)
pure virtual

Set the frame buffer's input coordinate end.

See SetInCoord().

Parameters
x2The end coordinate in X direction.
y2The end coordinate in Y direction.
Returns
true if successful.

◆ SetInCoordX1()

virtual Bool Murl::Graph::IFrameBuffer::SetInCoordX1 ( Real  x1)
pure virtual

Set the frame buffer's horizontal start input coordinate.

See SetInCoord().

Parameters
x1The start coordinate in X direction.
Returns
true if successful.

◆ SetInCoordY1()

virtual Bool Murl::Graph::IFrameBuffer::SetInCoordY1 ( Real  y1)
pure virtual

Set the frame buffer's vertical start input coordinates.

See SetInCoord().

Parameters
y1The start coordinate in Y direction.
Returns
true if successful.

◆ SetInCoordX2()

virtual Bool Murl::Graph::IFrameBuffer::SetInCoordX2 ( Real  x2)
pure virtual

Set the frame buffer's horizontal end input coordinate.

See SetInCoord().

Parameters
x2The end coordinate in X direction.
Returns
true if successful.

◆ SetInCoordY2()

virtual Bool Murl::Graph::IFrameBuffer::SetInCoordY2 ( Real  y2)
pure virtual

Set the frame buffer's vertical end input coordinates.

See SetInCoord().

Parameters
y2The end coordinate in Y direction.
Returns
true if successful.

◆ GetInCoordX1()

virtual Real Murl::Graph::IFrameBuffer::GetInCoordX1 ( ) const
pure virtual

Get the frame buffer's horizontal start input coordinate.

See SetInCoord().

Returns
The start coordinate in X direction.

◆ GetInCoordY1()

virtual Real Murl::Graph::IFrameBuffer::GetInCoordY1 ( ) const
pure virtual

Get the frame buffer's vertical start input coordinate.

See SetInCoord().

Returns
The start coordinate in Y direction.

◆ GetInCoordX2()

virtual Real Murl::Graph::IFrameBuffer::GetInCoordX2 ( ) const
pure virtual

Get the frame buffer's horizontal end input coordinate.

See SetInCoord().

Returns
The end coordinate in X direction.

◆ GetInCoordY2()

virtual Real Murl::Graph::IFrameBuffer::GetInCoordY2 ( ) const
pure virtual

Get the frame buffer's vertical end input coordinate.

See SetInCoord().

Returns
The end coordinate in Y direction.

◆ GetNumberOfStages()

virtual UInt32 Murl::Graph::IFrameBuffer::GetNumberOfStages ( ) const
pure virtual

Get the frame buffer's number of stages.

Returns
The number of stages.

◆ GetVideoFrameBufferObject()

virtual Video::IFrameBuffer* Murl::Graph::IFrameBuffer::GetVideoFrameBufferObject ( UInt32  stage) const
pure virtual

Get the frame buffer's internal video renderer object.

Parameters
stageThe stage to query.
Returns
The video renderer object.

◆ GetInputScreenAreaObject()

virtual Input::IScreenArea* Murl::Graph::IFrameBuffer::GetInputScreenAreaObject ( UInt32  stage) const
pure virtual

Get the frame buffer's internal input screen area object.

Parameters
stageThe stage to query.
Returns
The input object.

The documentation for this interface was generated from the following file:
  • murl_graph_i_frame_buffer.h


Copyright © 2011-2024 Spraylight GmbH.