GPUDepthStencilState constructor

GPUDepthStencilState({
  1. String format,
  2. bool depthWriteEnabled,
  3. String depthCompare,
  4. GPUStencilFaceState stencilFront,
  5. GPUStencilFaceState stencilBack,
  6. int stencilReadMask,
  7. int stencilWriteMask,
  8. int depthBias,
  9. double depthBiasSlopeScale,
  10. double depthBiasClamp,
})

The depth and stencil half of a pipeline.

All of it is pipeline state here and per-draw state in the contract, which is the divergence command_encoder.dart already names: the setters are accumulated and a pipeline is looked up at the draw. stencilReadMask and stencilWriteMask are pipeline state too — only the reference value is dynamic, which is why setStencilReference exists on the pass and its two masks do not.

Implementation

external factory GPUDepthStencilState({
  String format,
  bool depthWriteEnabled,
  String depthCompare,
  GPUStencilFaceState stencilFront,
  GPUStencilFaceState stencilBack,
  int stencilReadMask,
  int stencilWriteMask,
  int depthBias,
  double depthBiasSlopeScale,
  double depthBiasClamp,
});