Class TextureArray

java.lang.Object
dev.pfaff.altargui.texture.AbstractTextureArray
dev.pfaff.altargui.texture.TextureArray
All Implemented Interfaces:
AutoCloseable

public final class TextureArray extends AbstractTextureArray
  • Field Details

    • BIND_TARGET

      public static final dev.pfaff.glass.opengl.enums.GLTextureTarget BIND_TARGET
    • handle

      public final int handle
  • Constructor Details

    • TextureArray

      public TextureArray()
  • Method Details

    • width

      public int width()
    • height

      public int height()
    • layers

      public int layers()
    • bound

      public InfallibleAutoClosable bound()
      Specified by:
      bound in class AbstractTextureArray
    • bindAndAllocate

      public void bindAndAllocate(int width, int height, int layerCount, TextureOptions options)
      Allocates the texture. It must already be bound().
      Specified by:
      bindAndAllocate in class AbstractTextureArray
    • bindAndUpload

      public void bindAndUpload(ImageSrc image, TextureHandle handle, int xOffset, int yOffset, int width, int height)
      Description copied from class: AbstractTextureArray
      The texture array will be bound and unbound by this method.
      Specified by:
      bindAndUpload in class AbstractTextureArray
    • startUploading

      public void startUploading()
    • upload

      public void upload(int layer, int xOffset, int yOffset, int width, int height, dev.pfaff.glass.opengl.enums.GLPixelFormat format, dev.pfaff.glass.opengl.enums.GLPixelType type, MemorySegment pixels)
      Remember to call startUploading().
    • uploadFromPixelUnpackBuffer

      public void uploadFromPixelUnpackBuffer(int layer, int xOffset, int yOffset, int width, int height, dev.pfaff.glass.opengl.enums.GLPixelFormat format, dev.pfaff.glass.opengl.enums.GLPixelType type)
      Remember to call startUploading().
    • upload

      public void upload(int layer, int width, int height, dev.pfaff.glass.opengl.enums.GLPixelFormat format, dev.pfaff.glass.opengl.enums.GLPixelType type, MemorySegment pixels)
      Remember to call startUploading().
    • uploadFull

      public void uploadFull(dev.pfaff.glass.opengl.enums.GLPixelFormat format, dev.pfaff.glass.opengl.enums.GLPixelType type, MemorySegment pixels)
      Remember to call startUploading().
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in class AbstractTextureArray
    • dump

      public void dump()
      Specified by:
      dump in class AbstractTextureArray