Package icyllis.arc3d.engine

# Class CpuBuffer

java.lang.Object
icyllis.arc3d.core.RefCnt
icyllis.arc3d.engine.CpuBuffer

All Implemented Interfaces:
  `RefCounted`

public final class CpuBuffer extends RefCnt
A client-side buffer represents an immutable block of native CPU memory.

This is only used as "staging buffers" in OpenGL and may not be used for other purposes.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `data()`
  `protected void`
  `deallocate()`
  Override this method to invoke de-allocation of the underlying resource.
  `static @SharedPtr CpuBuffer`
  `make(long size)`
  `long`
  `size()`
  Size of the buffer in bytes.

  ### Methods inherited from class icyllis.arc3d.core.RefCnt

  `create, create, getRefCnt, getRefCntAcquire, getRefCntVolatile, move, move, ref, unique, unref`

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

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

- ## Method Details

  - ### make

    @Nullable @SharedPtr public static @SharedPtr CpuBuffer make(long size)

  - ### size

    public long size()
    Size of the buffer in bytes.

  - ### data

    public long data()

  - ### deallocate

    protected void deallocate()
    Description copied from class: `RefCnt`
    Override this method to invoke de-allocation of the underlying resource.
    Specified by:
      `deallocate` in class `RefCnt`