C# Class Vector.Gpu.FrameBuffer

Inheritance: IDisposable
Exibir arquivo Open project: sinclairzx81/vector-cs Class Usage Examples

Public Methods

Method Description
Begin ( ColorBuffer colorBuffer ) : void

Begins a FrameBuffer Pass. Binds only a Color Buffer. The viewport is automatically ajusted to be width and height of the ColorBuffer.

Begin ( ColorBuffer colorBuffer, DepthBuffer depthBuffer ) : void

Binds a ColorBuffer and Depth Buffer. A Frame Buffer "must" be bound with a depth buffer if you intend on rendering geometry with this FrameBuffer.

Begin ( ColorBuffer colorBuffer, DepthBuffer depthBuffer, ViewPort viewPort ) : void

Binds a ColorBuffer and Depth Buffer. A Frame Buffer "must" be bound with a depth buffer if you intend on rendering geometry with this FrameBuffer.

Begin ( ColorBuffer colorBuffer, ViewPort viewPort ) : void

Begins a FrameBuffer Pass. Binds only a Color Buffer.

Begin ( Texture2D colorTexture ) : void

Begins a FrameBuffer Pass. Binds a Texture as a RenderTargets. Will automatically set the devices Viewport to match the dimensions of the Texture.

Begin ( Texture2D colorTexture, DepthBuffer depthBuffer ) : void

Begins a FrameBuffer Pass. Binds a Texture and a DepthBuffer as the RenderTargets. Will automatically set the devices Viewport to match the dimensions of the Texture.

Begin ( Texture2D colorTexture, DepthBuffer depthBuffer, ViewPort viewPort ) : void

Begins this Render Buffer with a Texture bound. Depth Buffer is required if rendering Geometry.

Begin ( Texture2D colorTexture, ViewPort viewPort ) : void

Begins this Render Buffer with a Texture bound.

Begin ( TextureCube colorTextureCube, DepthBuffer depthBuffer, TextureCubeFace face ) : void

Begins a FrameBuffer Pass. Binds a CubeTexture and a DepthBuffer as the RenderTargets. Will automatically set the devices Viewport to match the dimensions of the Texture.

Begin ( TextureCube colorTextureCube, DepthBuffer depthBuffer, TextureCubeFace face, ViewPort viewPort ) : void

Begins a Texture Cube Rendering Pass.

Begin ( TextureCube colorTextureCube, TextureCubeFace face ) : void

Begins a FrameBuffer Pass. Binds a CubeTexture as the RenderTarget. Will automatically set the Device's ViewPort to match the dimentions of the CubeTexture.

Begin ( TextureCube colorTextureCube, TextureCubeFace face, ViewPort viewPort ) : void

Begins a FrameBuffer Pass. Binds a CubeTexture as the RenderTargets.

BeginDepth ( ColorBuffer colorBuffer, Texture2D depthTexture ) : void

Begins Depth Render Pass. Depth Texture TextureFormat "should" be TextureFormat.Depth32

BeginDepth ( ColorBuffer colorBuffer, Texture2D depthTexture, ViewPort viewPort ) : void

Begins Depth Render Pass. Depth Texture TextureFormat "should" be TextureFormat.Depth32

Clear ( float red, float blue, float green, float alpha ) : void

Clears this FrameBuffer. Has the same effect as calling it on the device. Ensure you can called Begin on this framebuffer first.

Dispose ( ) : void
End ( ) : void

Unbinds this FrameBuffer and returns rendering back to the main device.

FrameBuffer ( Device device ) : System
Read ( FrameBuffer frameBuffer, FrameBufferReadTarget target ) : void

Reads from another Buffers output.

Private Methods

Method Description
CheckStatus ( int status ) : void
Dispose ( bool disposing ) : void

Method Details

Begin() public method

Begins a FrameBuffer Pass. Binds only a Color Buffer. The viewport is automatically ajusted to be width and height of the ColorBuffer.
public Begin ( ColorBuffer colorBuffer ) : void
colorBuffer ColorBuffer
return void

Begin() public method

Binds a ColorBuffer and Depth Buffer. A Frame Buffer "must" be bound with a depth buffer if you intend on rendering geometry with this FrameBuffer.
public Begin ( ColorBuffer colorBuffer, DepthBuffer depthBuffer ) : void
colorBuffer ColorBuffer
depthBuffer DepthBuffer
return void

Begin() public method

Binds a ColorBuffer and Depth Buffer. A Frame Buffer "must" be bound with a depth buffer if you intend on rendering geometry with this FrameBuffer.
public Begin ( ColorBuffer colorBuffer, DepthBuffer depthBuffer, ViewPort viewPort ) : void
colorBuffer ColorBuffer
depthBuffer DepthBuffer
viewPort ViewPort
return void

Begin() public method

Begins a FrameBuffer Pass. Binds only a Color Buffer.
public Begin ( ColorBuffer colorBuffer, ViewPort viewPort ) : void
colorBuffer ColorBuffer
viewPort ViewPort
return void

Begin() public method

Begins a FrameBuffer Pass. Binds a Texture as a RenderTargets. Will automatically set the devices Viewport to match the dimensions of the Texture.
public Begin ( Texture2D colorTexture ) : void
colorTexture Texture2D
return void

Begin() public method

Begins a FrameBuffer Pass. Binds a Texture and a DepthBuffer as the RenderTargets. Will automatically set the devices Viewport to match the dimensions of the Texture.
public Begin ( Texture2D colorTexture, DepthBuffer depthBuffer ) : void
colorTexture Texture2D
depthBuffer DepthBuffer
return void

Begin() public method

Begins this Render Buffer with a Texture bound. Depth Buffer is required if rendering Geometry.
public Begin ( Texture2D colorTexture, DepthBuffer depthBuffer, ViewPort viewPort ) : void
colorTexture Texture2D
depthBuffer DepthBuffer
viewPort ViewPort
return void

Begin() public method

Begins this Render Buffer with a Texture bound.
public Begin ( Texture2D colorTexture, ViewPort viewPort ) : void
colorTexture Texture2D
viewPort ViewPort
return void

Begin() public method

Begins a FrameBuffer Pass. Binds a CubeTexture and a DepthBuffer as the RenderTargets. Will automatically set the devices Viewport to match the dimensions of the Texture.
public Begin ( TextureCube colorTextureCube, DepthBuffer depthBuffer, TextureCubeFace face ) : void
colorTextureCube TextureCube
depthBuffer DepthBuffer
face TextureCubeFace
return void

Begin() public method

Begins a Texture Cube Rendering Pass.
public Begin ( TextureCube colorTextureCube, DepthBuffer depthBuffer, TextureCubeFace face, ViewPort viewPort ) : void
colorTextureCube TextureCube
depthBuffer DepthBuffer
face TextureCubeFace
viewPort ViewPort
return void

Begin() public method

Begins a FrameBuffer Pass. Binds a CubeTexture as the RenderTarget. Will automatically set the Device's ViewPort to match the dimentions of the CubeTexture.
public Begin ( TextureCube colorTextureCube, TextureCubeFace face ) : void
colorTextureCube TextureCube
face TextureCubeFace
return void

Begin() public method

Begins a FrameBuffer Pass. Binds a CubeTexture as the RenderTargets.
public Begin ( TextureCube colorTextureCube, TextureCubeFace face, ViewPort viewPort ) : void
colorTextureCube TextureCube
face TextureCubeFace
viewPort ViewPort
return void

BeginDepth() public method

Begins Depth Render Pass. Depth Texture TextureFormat "should" be TextureFormat.Depth32
public BeginDepth ( ColorBuffer colorBuffer, Texture2D depthTexture ) : void
colorBuffer ColorBuffer
depthTexture Texture2D Depth Texture Render Target
return void

BeginDepth() public method

Begins Depth Render Pass. Depth Texture TextureFormat "should" be TextureFormat.Depth32
public BeginDepth ( ColorBuffer colorBuffer, Texture2D depthTexture, ViewPort viewPort ) : void
colorBuffer ColorBuffer
depthTexture Texture2D Depth Texture Render Target
viewPort ViewPort
return void

Clear() public method

Clears this FrameBuffer. Has the same effect as calling it on the device. Ensure you can called Begin on this framebuffer first.
public Clear ( float red, float blue, float green, float alpha ) : void
red float
blue float
green float
alpha float
return void

Dispose() public method

public Dispose ( ) : void
return void

End() public method

Unbinds this FrameBuffer and returns rendering back to the main device.
public End ( ) : void
return void

FrameBuffer() public method

public FrameBuffer ( Device device ) : System
device Device
return System

Read() public method

Reads from another Buffers output.
public Read ( FrameBuffer frameBuffer, FrameBufferReadTarget target ) : void
frameBuffer FrameBuffer
target FrameBufferReadTarget
return void