Ritchie's Abstractions 0.2
Platform abstractions that make Toolbox work
Loading...
Searching...
No Matches
FrameBuffer Class Referencesealed

A graphics frame buffer. This is a 2-dimensional surface that can both be used as a texture and used as a destination for rendering. More...

Inheritance diagram for FrameBuffer:
Texture GraphicsObject

Public Member Functions

 FrameBuffer (int width, int height, SurfaceFormat colorSurfaceFormat, PixelFormat colorPixelFormat, DepthStencilFormat depthStencilFormat)
 Creates a new

See also
FrameBuffer

.

 
- Public Member Functions inherited from GraphicsObject
void Dispose ()
 

Static Public Member Functions

static implicit operator Texture2D (FrameBuffer frameBuffer)
 Implicit conversion from a

See also
FrameBuffer

instance to a Texture2D instance.

 

Protected Member Functions

override void Dispose (bool disposing)
 Called when it's time to throw out the trash.
Parameters
disposingIf true, please throw away your trash. Skunks!

 
- Protected Member Functions inherited from GraphicsObject
 GraphicsObject ()
 Creates a new GraphicsObject instance.
 

Properties

int Width [get]
 Gets the width of the framebuffer surface, in pixels.
 
int Height [get]
 Gets the height of the framebuffer surface, in pixels.
 
- Properties inherited from GraphicsObject
GraphicsDevice GraphicsDevice [get]
 Gets the GraphicsDevice instance this GraphicsObject belongs to.
 

Detailed Description

A graphics frame buffer. This is a 2-dimensional surface that can both be used as a texture and used as a destination for rendering.

Constructor & Destructor Documentation

◆ FrameBuffer()

FrameBuffer ( int width,
int height,
SurfaceFormat colorSurfaceFormat,
PixelFormat colorPixelFormat,
DepthStencilFormat depthStencilFormat )
inline

Creates a new

See also
FrameBuffer

.

Parameters
widthThe width of the framebuffer in pixels. Must be positive.
heightThe height of the framebuffer in pixels. Must be positive.
colorSurfaceFormatThe surface format for the color surface.
colorPixelFormatThe pixel format for the color surface.
depthStencilFormatThe format of, and whether to include, the depth and stencil buffer.

Member Function Documentation

◆ Dispose()

override void Dispose ( bool disposing)
inlineprotectedvirtual

Called when it's time to throw out the trash.

Parameters
disposingIf true, please throw away your trash. Skunks!

Reimplemented from GraphicsObject.

◆ operator Texture2D()

static implicit operator Texture2D ( FrameBuffer frameBuffer)
inlinestatic

Implicit conversion from a

See also
FrameBuffer

instance to a Texture2D instance.

Parameters
frameBufferThe framebuffer to convert.
Returns
An instance of Texture2D representing the frame buffer.

If you are familiar with the likes of FNA and MonoGame, framebuffers (RenderTarget2D) are also textures. In this implementation, that is not the case. The frame buffer object and its color surface are distinct concepts.


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