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
파일 보기 프로젝트 열기: Wiladams/NewTOAPIA 1 사용 예제들

공개 메소드들

메소드 설명
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