Class RenderTarget


  • public class RenderTarget
    extends java.lang.Object
    An offscreen render target that can be associated with a View and contains weak references to a set of attached Texture objects.

    Clients are responsible for the lifetime of all associated Texture attachments.

    See Also:
    View
    • Method Detail

      • getNativeObject

        public long getNativeObject()
      • getTexture

        @Nullable
        public Texture getTexture​(@NonNull
                                  RenderTarget.AttachmentPoint attachment)
        Gets the texture set on the given attachment point.
        Parameters:
        attachment - Attachment point
        Returns:
        A Texture object or nullptr if no texture is set for this attachment point
      • getMipLevel

        @IntRange(from=0L)
        public int getMipLevel​(@NonNull
                               RenderTarget.AttachmentPoint attachment)
        Returns the mipmap level set on the given attachment point.
        Parameters:
        attachment - Attachment point
        Returns:
        the mipmap level set on the given attachment point
      • getFace

        public Texture.CubemapFace getFace​(RenderTarget.AttachmentPoint attachment)
        Returns the face of a cubemap set on the given attachment point.
        Parameters:
        attachment - Attachment point
        Returns:
        A cubemap face identifier. This is only relevant if the attachment's texture is a cubemap.
      • getLayer

        @IntRange(from=0L)
        public int getLayer​(@NonNull
                            RenderTarget.AttachmentPoint attachment)
        Returns the texture-layer set on the given attachment point.
        Parameters:
        attachment - Attachment point
        Returns:
        A texture layer. This is only relevant if the attachment's texture is a 3D texture.