FrameBuffer Class Reference

Class representing the frame buffer. More...

Inherited by ScreenBuffer.

List of all members.

Public Member Functions

 FrameBuffer ()
 Creates a frame buffer.
virtual Object ShallowClone ()
 Creates a copy of the frame buffer.
void Dispose ()
 Frees the unmanaged resources of the frame buffer.
RenderTarget GetColorTarget ()
 Obtains the color storage destination.
void SetColorTarget (RenderTarget target)
 Sets the color storage destination.
void SetColorTarget (ColorBuffer buffer)
 Sets the color storage destination (for the color buffer)
void SetColorTarget (Texture2D texture, int level)
 Sets the color storage destination (for the 2D textures)
void SetColorTarget (TextureCube texture, int level, TextureCubeFace cubeFace)
 Sets the color storage destination (for the cube textures)
RenderTarget GetDepthTarget ()
 Obtains the depth storage destination.
void SetDepthTarget (RenderTarget target)
 Sets the depth storage destination.
void SetDepthTarget (DepthBuffer buffer)
 Sets the depth storage destination (for the depth buffer)

Protected Member Functions

 FrameBuffer (FrameBuffer buffer)
 Creates a copy of the frame buffer.

Properties

bool Status [get]
 Frame buffer state (true if rendering is enabled)
int Width [get]
 Frame buffer width.
int Height [get]
 Frame buffer height.
float AspectRatio [get]
 Frame buffer aspect ratio (width/height)
ImageRect Rectangle [get]
 Frame buffer entire size rectangle (0,0,width,height)
PixelFormat ColorFormat [get]
 Frame buffer color format.
PixelFormat DepthFormat [get]
 Frame buffer depth format.
MultiSampleMode MultiSampleMode [get]
 Frame buffer multi-sample mode.

Detailed Description

Class representing the frame buffer.


Constructor & Destructor Documentation

Creates a frame buffer.

Creates a frame buffer. Use after setting the color and depth storage destinations.

FrameBuffer ( FrameBuffer  buffer) [protected]

Creates a copy of the frame buffer.

Returns:
Clones the frame buffer

Creates a copy of the frame buffer. The 2 frame buffers will then share unmanaged resources. When Dispose() is called for all copies, the shared unmanaged resources will be freed.


Member Function Documentation

RenderTarget GetColorTarget ( )

Obtains the color storage destination.

Returns:
Structure representing the color storage destination
RenderTarget GetDepthTarget ( )

Obtains the depth storage destination.

Returns:
Structure representing the depth storage destination
void SetColorTarget ( TextureCube  texture,
int  level,
TextureCubeFace  cubeFace 
)

Sets the color storage destination (for the cube textures)

Parameters:
textureCube texture (release when NULL)
levelMipmap level (0 to LevelCount-1)
cubeFaceCube surface

Sets the cube textures to the color storage destination. The texture must be created by specifying the Renderable option.

void SetColorTarget ( Texture2D  texture,
int  level 
)

Sets the color storage destination (for the 2D textures)

Parameters:
texture2D texture (release when NULL)
levelMipmap level (0 to LevelCount-1)

Sets the 2D textures to the color storage destination. The texture must be created by specifying the Renderable option.

void SetColorTarget ( RenderTarget  target)

Sets the color storage destination.

Parameters:
targetStructure representing the color storage destination

Sets the color storage destination with the structure. When setting the texture to a storage destination, the texture must be created by specifying the Renderable option.

void SetColorTarget ( ColorBuffer  buffer)

Sets the color storage destination (for the color buffer)

Parameters:
bufferColor buffer (release when NULL)

Sets the color buffer to the color storage destination.

void SetDepthTarget ( RenderTarget  target)

Sets the depth storage destination.

Parameters:
targetStructure representing the depth storage destination

Sets the depth storage destination with the structure.

void SetDepthTarget ( DepthBuffer  buffer)

Sets the depth storage destination (for the depth buffer)

Parameters:
bufferDepth buffer (release when NULL)

Sets the depth buffer to the depth storage destination.

virtual Object ShallowClone ( ) [virtual]

Creates a copy of the frame buffer.

Returns:
Copy of the frame buffer

Creates a copy of the frame buffer. The 2 frame buffers will then share unmanaged resources. When Dispose() is called for all copies, the shared unmanaged resources will be freed.