Home -> IFrameBuffer

Declaration

class IFrameBuffer;

Description

The IFrameBuffer interface represents a framebuffer, which receives the output from drawing operations. Framebuffers are used by attaching them to an IRenderPassNode A framebuffer doesn't hold storage by itself, it must be bound to something to write to. A framebuffer can be bound directly to a window surface, allowing the result of drawing operations to appear on the screen and be shown to the user. A framebuffer can also be bound to one or more texture targets. Within a pixel shader it is possible to write to multiple independent output targets, which can be bound on the framebuffer as separate textures. These textures can then be used as input resources for subsequent render passes or composite passes when performing multi-pass rendering.

Generally speaking, the final contents of a rendering operation are not directly accessible to the program. Modern graphics hardware is designed around producing images on the graphics card, and passing those images directly out to the display or using them in subsequent drawing operations. If it is required to read back the results of drawing operations, such as for producing screenshots, this can be done by attaching an IFrameBufferOutput object to the framebuffer, using the AddOutputCaptureTarget method. Please be aware that due to the inherent overhead in reading back resulting buffer contents from the hardware, this may have a significant impact on render times, so it is advisable to only leave a IFrameBufferOutput object attached for the shortest time required.

Enumerations

Name Description
Public Enum AttachmentType
The type of framebuffer attachment, such as colour, depth, stencil.
Public Enum WindowBindingFlags
Flags to specify additional options when binding to a window surface
Public Enum WindowColorSpaceMode
The color space mode to use when binding to a window surface
Public Enum WindowDepthStencilMode
The depth/stencil mode to use when binding to a window surface

Structures

Name Description
Public Struct WindowInfoBase
Base structure for platform-specific window information structures. See the BindWindow method for more information.

Members

Initialization methods

Name Description
Public member Delete
Schedules the object for deletion. After calling this method, the object will be destroyed after the current frame completes drawing.

Binding methods

Name Description
Public member BindTexture
Binds the specified texture to the framebuffer
Public member UnbindTexture
Unbinds a preiously bound texture from the framebuffer
Public member BindMultiSamplingResolveTexture
Binds a texture to resolve a multisampled framebuffer attachment to
Public member UnbindMultiSamplingResolveTexture
Unbinds a preiously bound multisample resolve texture
Public member BindWindow
Binds the specified window to the framebuffer
Public member NotifyWindowResized
Notifies the framebuffer that the bound native window drawable size has changed.

Viewport methods

Name Description
Public member DefineViewportRegion
Defines the position and size of the viewport to draw into within the bound texture or window
Public member DefineScissorRegion
Establishes a scissor region to restrict the region of the framebuffer that is drawn to
Public member RemoveScissorRegion
Removes a previously defined scissor region

Output capture methods

Name Description
Public member AddOutputCaptureTarget
Adds the specified output capture target to this framebuffer. This allows the results of rendering to a framebuffer to be retrieved by the application.
Public member RemoveOutputCaptureTarget
Removes the specified output capture target from this framebuffer.

See also