RenderTarget¶
Namespace Nfty.Model.Render in assembly Nfty.Model.
A plain pixel-and-depth surface Raster writes into: one background-filled color per pixel and a z-buffer initialized to "nothing here yet". The array references are fixed at construction (D7); their contents mutate freely as Raster draws. Single owner; not thread-safe.
Constructors¶
RenderTarget(int, int)¶
Allocates a RenderTarget.Width × RenderTarget.Height surface. Both dimensions must be positive.
Parameters
width(int) - Width in pixels; must be positive.height(int) - Height in pixels; must be positive.
Exceptions
ArgumentOutOfRangeException- A dimension is not positive.
Properties¶
Color¶
One color per pixel, row-major, length RenderTarget.Width × RenderTarget.Height.
Depth¶
One depth value per pixel, same shape as RenderTarget.Color. Smaller is closer; PositiveInfinity means nothing has drawn there yet.
Height¶
Pixels down.
Width¶
Pixels across.
Methods¶
Clear(Rgba32)¶
Resets every pixel to background and every depth to infinity.
Parameters
background(Rgba32) - The color to fill with.