Class BGFXTransientIndexBuffer

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

    public class BGFXTransientIndexBuffer
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Transient index buffer.

    Layout

    
     struct bgfx_transient_index_buffer_t {
         uint8_t * data();
         uint32_t size();
         uint32_t startIndex();
         bgfx_index_buffer_handle_t handle();
         bool isIndex16();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • DATA, SIZE, STARTINDEX, HANDLE, ISINDEX16

        The struct member offsets.
    • Constructor Detail

      • BGFXTransientIndexBuffer

        public BGFXTransientIndexBuffer​(java.nio.ByteBuffer container)
        Creates a BGFXTransientIndexBuffer 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
      • data

        public java.nio.ByteBuffer data()
        pointer to data
      • size

        public int size()
        data size
      • startIndex

        public int startIndex()
        first index
      • handle

        public short handle()
        index buffer handle
      • isIndex16

        public boolean isIndex16()
        index buffer format is 16-bits if true, otherwise it is 32-bit
      • set

        public BGFXTransientIndexBuffer set​(java.nio.ByteBuffer data,
                                            int startIndex,
                                            short handle,
                                            boolean isIndex16)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

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

        public static BGFXTransientIndexBuffer.Buffer calloc​(int capacity,
                                                             org.lwjgl.system.MemoryStack stack)
        Returns a new BGFXTransientIndexBuffer.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
      • ndata

        public static java.nio.ByteBuffer ndata​(long struct)
        Unsafe version of data.
      • nsize

        public static int nsize​(long struct)
        Unsafe version of size().
      • nstartIndex

        public static int nstartIndex​(long struct)
        Unsafe version of startIndex().
      • nhandle

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

        public static boolean nisIndex16​(long struct)
        Unsafe version of isIndex16().
      • ndata

        public static void ndata​(long struct,
                                 java.nio.ByteBuffer value)
        Unsafe version of data.
      • nsize

        public static void nsize​(long struct,
                                 int value)
        Sets the specified value to the size field of the specified struct.
      • nstartIndex

        public static void nstartIndex​(long struct,
                                       int value)
        Unsafe version of startIndex.
      • nhandle

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

        public static void nisIndex16​(long struct,
                                      boolean value)
        Unsafe version of isIndex16.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate