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:
  • Field Details

    • GEOMETRY_UNIFORM_BLOCK_BINDING

      public static final int GEOMETRY_UNIFORM_BLOCK_BINDING
      See Also:
    • FRAGMENT_UNIFORM_BLOCK_BINDING

      public static final int FRAGMENT_UNIFORM_BLOCK_BINDING
      See Also:
    • GEOMETRY_UNIFORM_BLOCK_NAME

      public static final String GEOMETRY_UNIFORM_BLOCK_NAME
      See Also:
    • FRAGMENT_UNIFORM_BLOCK_NAME

      public static final String FRAGMENT_UNIFORM_BLOCK_NAME
      See Also:
    • 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:
    • INVALID_INDEX

      public static final int INVALID_INDEX
      An invalid index for UniformTracker, also for pipeline index.
      See Also:
  • 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