Package icyllis.arc3d.opengl

# Class GLRenderbuffer

java.lang.Object
icyllis.arc3d.engine.Resource
icyllis.arc3d.engine.Image
icyllis.arc3d.opengl.GLImage
icyllis.arc3d.opengl.GLRenderbuffer

All Implemented Interfaces:
  `RefCounted`

public final class GLRenderbuffer extends GLImage
Represents OpenGL renderbuffers.

Renderbuffer can be only used as attachments of framebuffers as an optimization. Renderbuffer can neither be accessed by shaders nor have mipmaps, but can be multisampled.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class icyllis.arc3d.opengl.GLImage

  `GLImage.ResourceKey`

- ## Field Summary

  ### Fields inherited from class icyllis.arc3d.engine.Image

  `mFlags`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `BackendFormat`
  `getBackendFormat()`
  `int`
  `getHandle()`
  `static GLRenderbuffer`
  `make(Context context, GLImageDesc desc, boolean budgeted)`
  `static @SharedPtr GLRenderbuffer`
  `makeColor(GLDevice device, int width, int height, int sampleCount, int format)`
  `static @SharedPtr GLRenderbuffer`
  `makeStencil(GLDevice device, int width, int height, int sampleCount, int format)`
  `static @SharedPtr GLRenderbuffer`
  `makeWrapped(GLDevice device, int width, int height, int sampleCount, int format, int renderbuffer)`
  `static @SharedPtr GLRenderbuffer`
  `makeWrappedRenderbuffer(Context context, int width, int height, int sampleCount, int format, int renderbuffer)`
  `protected void`
  `onRelease()`
  Subclass should override this method to free GPU resources in the backend API.
  `protected void`
  `onSetLabel(String label)`
  Subclass should override this method to set object label in the backend API.
  `String`
  `toString()`

  ### Methods inherited from class icyllis.arc3d.opengl.GLImage

  `getDevice, getFormat, getGLDesc, getTarget`

  ### Methods inherited from class icyllis.arc3d.engine.Image

  `getArraySize, getDepth, getDepthBits, getDesc, getHeight, getImageType, getMipLevelCount, getMutableState, getSampleCount, getStencilBits, getWidth, isMipmapped, isMipmapsDirty, isProtected, isReadOnly, isRenderable, isSampledImage, isStorageImage, setMipmapsDirty, setReleaseCallback`

  ### Methods inherited from class icyllis.arc3d.engine.Resource

  `getContext, getKey, getLabel, getMemorySize, getUniqueID, hasAnyRefs, hasCacheRef, hasCommandBufferRef, hasUsageRef, isBudgeted, isDestroyed, isPurgeable, isWrapped, ref, refCommandBuffer, setKey, setLabel, setNonCacheable, unref, unrefCommandBuffer`

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

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

- ## Method Details

  - ### makeStencil

    @Nullable @SharedPtr public static @SharedPtr GLRenderbuffer makeStencil(GLDevice device, int width, int height, int sampleCount, int format)

  - ### makeColor

    @Nullable @SharedPtr public static @SharedPtr GLRenderbuffer makeColor(GLDevice device, int width, int height, int sampleCount, int format)

  - ### makeWrapped

    @Nonnull @SharedPtr public static @SharedPtr GLRenderbuffer makeWrapped(GLDevice device, int width, int height, int sampleCount, int format, int renderbuffer)

  - ### makeWrappedRenderbuffer

    @Nonnull @SharedPtr public static @SharedPtr GLRenderbuffer makeWrappedRenderbuffer(Context context, int width, int height, int sampleCount, int format, int renderbuffer)

  - ### make

    public static GLRenderbuffer make(Context context, GLImageDesc desc, boolean budgeted)

  - ### getBackendFormat

    @Nonnull public BackendFormat getBackendFormat()

  - ### onSetLabel

    protected void onSetLabel(@Nullable String label)
    Description copied from class: `Resource`
    Subclass should override this method to set object label in the backend API.
    Overrides:
      `onSetLabel` in class `Resource`

  - ### onRelease

    protected void onRelease()
    Description copied from class: `Resource`
    Subclass should override this method to free GPU resources in the backend API.
    Overrides:
      `onRelease` in class `Image`

  - ### getHandle

    public int getHandle()
    Specified by:
      `getHandle` in class `GLImage`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`