Package icyllis.arc3d.granite

# Class DrawPass

java.lang.Object
icyllis.arc3d.granite.DrawPass

All Implemented Interfaces:
  `AutoCloseable`

public class DrawPass extends Object implements AutoCloseable
A draw pass represents a render pass, with limited and sorted draw commands.

Created immutable.

See Also:
  - `PipelineBuilder`

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `DrawPass.SortKey`
  The sorting is used to minimize state change.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `FRAGMENT_UNIFORM_BLOCK_BINDING`
  `static final String`
  `FRAGMENT_UNIFORM_BLOCK_NAME`
  `static final int`
  `GEOMETRY_UNIFORM_BLOCK_BINDING`
  `static final String`
  `GEOMETRY_UNIFORM_BLOCK_NAME`
  `static final int`
  `INVALID_INDEX`
  An invalid index for `UniformTracker`, also for pipeline index.
  `static final int`
  `MAX_RENDER_STEPS`
  Depth buffer is 16-bit, ensure no overflow.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `boolean`
  `execute(CommandBuffer commandBuffer)`
  `Rect2ic`
  `getBounds()`
  `DrawCommandList`
  `getCommandList()`
  `int`
  `getDepthStencilFlags()`
  `static DrawPass`
  `make(RecordingContext context, it.unimi.dsi.fastutil.objects.ObjectArrayList<Draw> drawList, int numSteps, @RawPtr ImageViewProxy targetView, ImageInfo deviceInfo)`
  Backing store's width/height may not equal to device's width/height, currently we use the backing dimensions for scissor and viewport.
  `boolean`
  `prepare(ResourceProvider resourceProvider, RenderPassDesc renderPassDesc)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### GEOMETRY_UNIFORM_BLOCK_BINDING

    public static final int GEOMETRY_UNIFORM_BLOCK_BINDING
    See Also:
      - Constant Field Values

  - ### FRAGMENT_UNIFORM_BLOCK_BINDING

    public static final int FRAGMENT_UNIFORM_BLOCK_BINDING
    See Also:
      - Constant Field Values

  - ### GEOMETRY_UNIFORM_BLOCK_NAME

    public static final String GEOMETRY_UNIFORM_BLOCK_NAME
    See Also:
      - Constant Field Values

  - ### FRAGMENT_UNIFORM_BLOCK_NAME

    public static final String FRAGMENT_UNIFORM_BLOCK_NAME
    See Also:
      - Constant Field Values

  - ### MAX_RENDER_STEPS

    public static final int MAX_RENDER_STEPS
    Depth buffer is 16-bit, ensure no overflow. The theoretic max for this value is 65535, but we see markedly better performance with smaller values
    See Also:
      - Constant Field Values

  - ### INVALID_INDEX

    public static final int INVALID_INDEX
    An invalid index for `UniformTracker`, also for pipeline index.
    See Also:
      - `MAX_RENDER_STEPS`
      - Constant Field Values

- ## Method Details

  - ### make

    @Nullable public static DrawPass make(RecordingContext context, it.unimi.dsi.fastutil.objects.ObjectArrayList<Draw> drawList, int numSteps, @RawPtr @RawPtr ImageViewProxy targetView, ImageInfo deviceInfo)
    Backing store's width/height may not equal to device's width/height, currently we use the backing dimensions for scissor and viewport. All the parameters are raw pointers and read-only.

    The first uniform variable in geometry block must be a projection vector, see `PipelineBuilder`.

  - ### getBounds

    public Rect2ic getBounds()

  - ### getDepthStencilFlags

    public int getDepthStencilFlags()

  - ### getCommandList

    public DrawCommandList getCommandList()

  - ### prepare

    public boolean prepare(ResourceProvider resourceProvider, RenderPassDesc renderPassDesc)

  - ### execute

    public boolean execute(CommandBuffer commandBuffer)

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`