Interface IRenderEncoderScope
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
PassTag
The tag of the render pass this scope draws in.
RenderPassTag PassTag { get; }
Property Value
Viewport
The area of the render surface this scope draws to, in pixels.
Rectangle Viewport { get; }
Property Value
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
colorColor
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
actionAction
SubmitShape(in ShapeDrawOptions)
Records a shape to be drawn by this scope.
void SubmitShape(in ShapeDrawOptions options)
Parameters
optionsShapeDrawOptions
SubmitSprite(in SpriteDrawOptions)
Records a sprite to be drawn by this scope.
void SubmitSprite(in SpriteDrawOptions options)
Parameters
optionsSpriteDrawOptions