Class BGFXTextureInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class BGFXTextureInfo extends Struct<BGFXTextureInfo> implements NativeResource

 struct bgfx_texture_info_t {
     bgfx_texture_format_t format;
     uint32_t storageSize;
     uint16_t width;
     uint16_t height;
     uint16_t depth;
     uint16_t numLayers;
     uint8_t numMips;
     uint8_t bitsPerPixel;
     bool cubeMap;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • FORMAT

      public static final int FORMAT
      The struct member offsets.
    • STORAGESIZE

      public static final int STORAGESIZE
      The struct member offsets.
    • WIDTH

      public static final int WIDTH
      The struct member offsets.
    • HEIGHT

      public static final int HEIGHT
      The struct member offsets.
    • DEPTH

      public static final int DEPTH
      The struct member offsets.
    • NUMLAYERS

      public static final int NUMLAYERS
      The struct member offsets.
    • NUMMIPS

      public static final int NUMMIPS
      The struct member offsets.
    • BITSPERPIXEL

      public static final int BITSPERPIXEL
      The struct member offsets.
    • CUBEMAP

      public static final int CUBEMAP
      The struct member offsets.
  • Constructor Details

    • BGFXTextureInfo

      public BGFXTextureInfo(ByteBuffer container)
      Creates a BGFXTextureInfo instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<BGFXTextureInfo>
    • format

      public int format()
      Returns:
      the value of the format field.
    • storageSize

      public int storageSize()
      Returns:
      the value of the storageSize field.
    • width

      public short width()
      Returns:
      the value of the width field.
    • height

      public short height()
      Returns:
      the value of the height field.
    • depth

      public short depth()
      Returns:
      the value of the depth field.
    • numLayers

      public short numLayers()
      Returns:
      the value of the numLayers field.
    • numMips

      public byte numMips()
      Returns:
      the value of the numMips field.
    • bitsPerPixel

      public byte bitsPerPixel()
      Returns:
      the value of the bitsPerPixel field.
    • cubeMap

      public boolean cubeMap()
      Returns:
      the value of the cubeMap field.
    • malloc

      public static BGFXTextureInfo malloc()
      Returns a new BGFXTextureInfo instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static BGFXTextureInfo calloc()
      Returns a new BGFXTextureInfo instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static BGFXTextureInfo create()
      Returns a new BGFXTextureInfo instance allocated with BufferUtils.
    • create

      public static BGFXTextureInfo create(long address)
      Returns a new BGFXTextureInfo instance for the specified memory address.
    • createSafe

      public static @Nullable BGFXTextureInfo createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static BGFXTextureInfo.Buffer malloc(int capacity)
      Returns a new BGFXTextureInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static BGFXTextureInfo.Buffer calloc(int capacity)
      Returns a new BGFXTextureInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static BGFXTextureInfo.Buffer create(int capacity)
      Returns a new BGFXTextureInfo.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static BGFXTextureInfo.Buffer create(long address, int capacity)
      Create a BGFXTextureInfo.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable BGFXTextureInfo.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static BGFXTextureInfo mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static BGFXTextureInfo callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static BGFXTextureInfo mallocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static BGFXTextureInfo callocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static BGFXTextureInfo.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static BGFXTextureInfo.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static BGFXTextureInfo.Buffer mallocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static BGFXTextureInfo.Buffer callocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static BGFXTextureInfo malloc(MemoryStack stack)
      Returns a new BGFXTextureInfo instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static BGFXTextureInfo calloc(MemoryStack stack)
      Returns a new BGFXTextureInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static BGFXTextureInfo.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new BGFXTextureInfo.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static BGFXTextureInfo.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new BGFXTextureInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nformat

      public static int nformat(long struct)
      Unsafe version of format().
    • nstorageSize

      public static int nstorageSize(long struct)
      Unsafe version of storageSize().
    • nwidth

      public static short nwidth(long struct)
      Unsafe version of width().
    • nheight

      public static short nheight(long struct)
      Unsafe version of height().
    • ndepth

      public static short ndepth(long struct)
      Unsafe version of depth().
    • nnumLayers

      public static short nnumLayers(long struct)
      Unsafe version of numLayers().
    • nnumMips

      public static byte nnumMips(long struct)
      Unsafe version of numMips().
    • nbitsPerPixel

      public static byte nbitsPerPixel(long struct)
      Unsafe version of bitsPerPixel().
    • ncubeMap

      public static boolean ncubeMap(long struct)
      Unsafe version of cubeMap().