RenderTarget
Sandbox.Engine
Derives from object
Implements IDisposable

Summary

Essentially wraps a couple of textures that we're going to render to. The color texture and the depth texture.

Constructors

Properties

Texture ColorTarget { get; }

The target colour texture

Texture DepthTarget { get; }

The target depth texture

int Height { get; }

Height of the render target

int Width { get; }

Width of the render target

Methods

static RenderTarget From( Texture color, Texture depth = null, )

Create a render target from these textures

static RenderTarget GetTemporary( int width, int height, ImageFormat colorFormat = -2, ImageFormat depthFormat = -2, int msaa = 0, )

Get a temporary render target. You should dispose the returned handle when you're done to return the textures to the pool.

static RenderTarget GetTemporary( int sizeFactor = 1, ImageFormat colorFormat = -2, ImageFormat depthFormat = -2, int msaa = 0, )

Get a temporary render target. You should dispose the returned handle when you're done to return the textures to the pool.

virtual void Dispose( )
Implements IDisposable.Dispose

Stop using this texture, return it to the pool

override string ToString( )
Overrides Object.ToString