C# Класс 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.
Наследование: IBindable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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).

Приватные методы

Метод Описание
CreateDepthBuffer ( int width, int height ) : void

Описание методов

AttachColorBuffer() публичный Метод

public AttachColorBuffer ( GLTexture2D colorbuffer, ColorBufferAttachPoint attachPosition ) : void
colorbuffer GLTexture2D
attachPosition ColorBufferAttachPoint
Результат void

Bind() публичный Метод

Make the RenderTarget the current target of rendering.
public Bind ( ) : void
Результат void

CreateDepthBuffer() публичный Метод

public CreateDepthBuffer ( ) : void
Результат void

GLRenderTarget() публичный Метод

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
Результат System.Collections.Generic

GLRenderTarget() публичный Метод

public GLRenderTarget ( GraphicsInterface gi ) : System.Collections.Generic
gi GraphicsInterface
Результат System.Collections.Generic

GLRenderTarget() публичный Метод

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.
Результат System.Collections.Generic

GetColorBuffer() публичный Метод

public GetColorBuffer ( ColorBufferAttachPoint attachPoint ) : GLTexture2D
attachPoint ColorBufferAttachPoint
Результат GLTexture2D

Unbind() публичный Метод

Switch back to the regular drawing context (typically the screen).
public Unbind ( ) : void
Результат void