Package icyllis.arc3d.engine

# Class QueueManager

java.lang.Object
icyllis.arc3d.engine.QueueManager

Direct Known Subclasses:
  `GLQueueManager`, `VulkanQueueManager`

public abstract class QueueManager extends Object
A `QueueManager` represents a GPU queue and manages a pool of command buffers in that queue.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected ImmediateContext`
  `mContext`
  `protected CommandBuffer`
  `mCurrentCommandBuffer`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `QueueManager(Device device)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `addTask(@RawPtr Task task)`
  `void`
  `checkForFinishedWork()`
  `protected abstract CommandBuffer`
  `createNewCommandBuffer(ResourceProvider resourceProvider)`
  `void`
  `finishOutstandingWork()`
  Blocks the current thread and waits for queue to finish outstanding works.
  `int`
  `getMaxCommandBuffers()`
  `boolean`
  `hasOutstandingWork()`
  Returns true if there is any unfinished GPU work.
  `protected boolean`
  `prepareCommandBuffer(ResourceProvider resourceProvider)`
  `boolean`
  `submit()`

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

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

- ## Field Details

  - ### mContext

    protected ImmediateContext mContext

  - ### mCurrentCommandBuffer

    protected CommandBuffer mCurrentCommandBuffer

- ## Constructor Details

  - ### QueueManager

    protected QueueManager(Device device)

- ## Method Details

  - ### addTask

    public boolean addTask(@RawPtr @RawPtr Task task)

  - ### submit

    public boolean submit()

  - ### getMaxCommandBuffers

    public int getMaxCommandBuffers()

  - ### hasOutstandingWork

    public boolean hasOutstandingWork()
    Returns true if there is any unfinished GPU work.

  - ### finishOutstandingWork

    public void finishOutstandingWork()
    Blocks the current thread and waits for queue to finish outstanding works.

  - ### checkForFinishedWork

    public void checkForFinishedWork()

  - ### prepareCommandBuffer

    protected boolean prepareCommandBuffer(ResourceProvider resourceProvider)

  - ### createNewCommandBuffer

    protected abstract CommandBuffer createNewCommandBuffer(ResourceProvider resourceProvider)