Class BGFXAttachment

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

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

    Layout

    
     struct bgfx_attachment_t {
         bgfx_access_t access();
         bgfx_texture_handle_t handle();
         uint16_t mip();
         uint16_t layer();
         uint16_t numLayers();
         uint8_t resolve();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • ACCESS, HANDLE, MIP, LAYER, NUMLAYERS, RESOLVE

        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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • access

        public int access()
        attachment access
      • handle

        public short handle()
        render target texture handle
      • mip

        public short mip()
        mip level
      • layer

        public short layer()
        cubemap side or depth layer/slice to use
      • numLayers

        public short numLayers()
        number of texture layer/slice(s) in array to use
      • mip

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

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

        public BGFXAttachment set​(BGFXAttachment src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

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

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

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

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

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

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

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

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

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

        @Deprecated
        public static BGFXAttachment mallocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

        @Deprecated
        public static BGFXAttachment callocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • malloc

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

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

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

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

        public static int naccess​(long struct)
        Unsafe version of access().
      • 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().
      • nnumLayers

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

        public static byte nresolve​(long struct)
        Unsafe version of resolve().
      • naccess

        public static void naccess​(long struct,
                                   int value)
        Unsafe version of access.
      • 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.
      • nnumLayers

        public static void nnumLayers​(long struct,
                                      short value)
        Unsafe version of numLayers.
      • nresolve

        public static void nresolve​(long struct,
                                    byte value)
        Unsafe version of resolve.