Table of Contents

Interface IRenderEncoderScope

Namespace
BSGameLib.Game.Rendering
Assembly
BSGameLib.Game.dll

Represents a scoped encoder that records sprite/shape commands and flushes on dispose.

public interface IRenderEncoderScope : IDisposable
Inherited Members
Extension Methods

Properties

PassName

The name of the render pass this scope draws in, used in diagnostics.

string PassName { get; }

Property Value

string

PassTag

The tag of the render pass this scope draws in.

RenderPassTag PassTag { get; }

Property Value

RenderPassTag

Viewport

The area of the render surface this scope draws to, in pixels.

Rectangle Viewport { get; }

Property Value

Rectangle

Methods

Clear(Color)

Fills the currently bound target with color, discarding anything submitted to this encoder before this call (there's no reason to draw something a full-target clear immediately paints over). Anything submitted after this call draws normally, on top of the clear. Call this first, before any other submission, for the common "clear then draw" case - it's not restricted to that position, but calling it after other draws only wastes the work already discarded.

void Clear(Color color)

Parameters

color Color

SubmitDrawCall(Action)

Records action to run in submission order, between the other draws, for drawing this scope does not do itself.

void SubmitDrawCall(Action action)

Parameters

action Action

SubmitShape(in ShapeDrawOptions)

Records a shape to be drawn by this scope.

void SubmitShape(in ShapeDrawOptions options)

Parameters

options ShapeDrawOptions

SubmitSprite(in SpriteDrawOptions)

Records a sprite to be drawn by this scope.

void SubmitSprite(in SpriteDrawOptions options)

Parameters

options SpriteDrawOptions