setViewport method

  1. @override
void setViewport(
  1. PassViewport viewport
)
override

Where the rasteriser maps clip space, and onto which depths.

A PassViewport since 1.0.0-rc.1: a rectangle in doubles and a depth range, where it was a ScreenRect of whole pixels with the depth range fixed at [0, 1]. A rectangle that is not whole pixels needs DeviceFeature.fractionalViewport; a backend calls PassViewport.checkFeatures on the way in and refuses one by name rather than round it. PassViewport.ofRect is the viewport over a ScreenRect's pixels.

Implementation

@override
void setViewport(PassViewport viewport) {
  _passOnly('setViewport');
  commands.add(RecordedViewport(viewport));
}