Class BGFXAttachment

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class BGFXAttachment
    extends Struct
    implements NativeResource
    Frame buffer texture attachment info.

    Member documentation

    • handle – texture handle
    • mip – mip level
    • layer – cubemap side or depth layer/slice


     struct bgfx_attachment_t {
         bgfx_texture_handle_t handle;
         uint16_t mip;
         uint16_t layer;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        The struct member offsets.
    • Constructor Detail

      • BGFXAttachment

        public BGFXAttachment​(java.nio.ByteBuffer container)
        Creates a BGFXAttachment 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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • handle

        public short handle()
        Returns the value of the handle field.
      • mip

        public short mip()
        Returns the value of the mip field.
      • layer

        public short layer()
        Returns the value of the layer field.
      • handle

        public BGFXAttachment handle​(short value)
        Sets the specified value to the handle field.
      • mip

        public BGFXAttachment mip​(short value)
        Sets the specified value to the mip field.
      • layer

        public BGFXAttachment layer​(short value)
        Sets the specified value to the layer field.
      • set

        public BGFXAttachment set​(short handle,
                                  short mip,
                                  short layer)
        Initializes this struct with the specified values.
      • set

        public BGFXAttachment set​(BGFXAttachment src)
        Copies the specified struct data to this struct.
        src - the source struct
        this struct
      • createSafe

        public static BGFXAttachment createSafe​(long address)
        Like create, but returns null if address is NULL.
      • create

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

        public static BGFXAttachment.Buffer createSafe​(long address,
                                                       int capacity)
        Like create, but returns null if address is NULL.
      • nhandle

        public static short nhandle​(long struct)
        Unsafe version of handle().
      • nmip

        public static short nmip​(long struct)
        Unsafe version of mip().
      • nlayer

        public static short nlayer​(long struct)
        Unsafe version of layer().
      • nhandle

        public static void nhandle​(long struct,
                                   short value)
        Unsafe version of handle.
      • nmip

        public static void nmip​(long struct,
                                short value)
        Unsafe version of mip.
      • nlayer

        public static void nlayer​(long struct,
                                  short value)
        Unsafe version of layer.