beginPass method

void beginPass(
  1. Size size
)

Begin a render pass at the given size.

Uses the current blendState and depthStencilState. After beginPass is called, resources can be bound. Call endPass to finalize the pass and obtain the rendered Image.

The graphics device can be used to bind resources like Meshs, Materials and Textures. Once you have executed all your bindings you can submit the batch to the GPU with endPass.

Implementation

void beginPass(Size size) {
  _renderTarget = _acquireRenderTarget(size);
  _renderPass = _frame.beginRenderPass(
    _renderTarget,
    blend: blendState,
    depthStencil: depthStencilState,
  );
}