C# Class NewTOAPIA.GL.GLRenderTarget

A GLRenderTarget is the encapsulation of a simple frame buffer object. The simplest frame buffer has a color buffer, and a depth buffer. It is constructed given a width and height in pixels. Usage: GLRenderTarget myTarget = new GLRenderTarget(width, height); myTarget.Bind(); // Do whatever rendering you want myTarget.Unbind(); The ColorBuffer property will contain the rendered color information.
Inheritance: IBindable
Afficher le fichier Open project: Wiladams/NewTOAPIA Class Usage Examples

Méthodes publiques

Méthode Description
AttachColorBuffer ( GLTexture2D colorbuffer, ColorBufferAttachPoint attachPosition ) : void
Bind ( ) : void

Make the RenderTarget the current target of rendering.

CreateDepthBuffer ( ) : void
GLRenderTarget ( GLTexture2D texture ) : System.Collections.Generic

This is the easiest constructor to use when you already have a texture, and you want to draw into it. Just pass the texture in, and the RenderTarget will be constructed to match the size.

GLRenderTarget ( GraphicsInterface gi ) : System.Collections.Generic
GLRenderTarget ( GraphicsInterface gi, int width, int height ) : System.Collections.Generic

Create a render target with the specified width and height in pixels. A color buffer and depth buffer will be attached.

GetColorBuffer ( ColorBufferAttachPoint attachPoint ) : GLTexture2D
Unbind ( ) : void

Switch back to the regular drawing context (typically the screen).

Private Methods

Méthode Description
CreateDepthBuffer ( int width, int height ) : void

Method Details

AttachColorBuffer() public méthode

public AttachColorBuffer ( GLTexture2D colorbuffer, ColorBufferAttachPoint attachPosition ) : void
colorbuffer GLTexture2D
attachPosition ColorBufferAttachPoint
Résultat void

Bind() public méthode

Make the RenderTarget the current target of rendering.
public Bind ( ) : void
Résultat void

CreateDepthBuffer() public méthode

public CreateDepthBuffer ( ) : void
Résultat void

GLRenderTarget() public méthode

This is the easiest constructor to use when you already have a texture, and you want to draw into it. Just pass the texture in, and the RenderTarget will be constructed to match the size.
public GLRenderTarget ( GLTexture2D texture ) : System.Collections.Generic
texture GLTexture2D
Résultat System.Collections.Generic

GLRenderTarget() public méthode

public GLRenderTarget ( GraphicsInterface gi ) : System.Collections.Generic
gi GraphicsInterface
Résultat System.Collections.Generic

GLRenderTarget() public méthode

Create a render target with the specified width and height in pixels. A color buffer and depth buffer will be attached.
public GLRenderTarget ( GraphicsInterface gi, int width, int height ) : System.Collections.Generic
gi GraphicsInterface The graphics interface used to construct the components.
width int The width of the RenderTarget in pixels.
height int The height of the RenderTarget in pixels.
Résultat System.Collections.Generic

GetColorBuffer() public méthode

public GetColorBuffer ( ColorBufferAttachPoint attachPoint ) : GLTexture2D
attachPoint ColorBufferAttachPoint
Résultat GLTexture2D

Unbind() public méthode

Switch back to the regular drawing context (typically the screen).
public Unbind ( ) : void
Résultat void