Package icyllis.arc3d.opengl

# Class CpuBufferPool

java.lang.Object
icyllis.arc3d.opengl.CpuBufferPool

public class CpuBufferPool extends Object
A cache object that can be shared by multiple `GpuBufferPool` instances. It caches cpu buffer allocations to avoid reallocating them.

NOTE: You must call `releaseAll()` when this cache is no longer used.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CpuBufferPool(int maxCount)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `@SharedPtr CpuBuffer`
  `makeBuffer(long size)`
  `void`
  `releaseAll()`

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

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

- ## Constructor Details

  - ### CpuBufferPool

    public CpuBufferPool(int maxCount)

- ## Method Details

  - ### makeBuffer

    @Nullable @SharedPtr public @SharedPtr CpuBuffer makeBuffer(long size)

  - ### releaseAll

    public void releaseAll()