Class BGFXTransientVertexBuffer

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

    public class BGFXTransientVertexBuffer
    extends Struct
    implements NativeResource
    Transient vertex buffer.

    Member documentation

    • data – pointer to data
    • size – data size
    • startVertex – first vertex
    • stride – vertex stride
    • handle – vertex buffer handle
    • layoutHandle – vertex layout handle

    Layout

    
     struct bgfx_transient_vertex_buffer_t {
         uint8_t * data;
         uint32_t size;
         uint32_t startVertex;
         uint16_t stride;
         bgfx_vertex_buffer_handle_t handle;
         bgfx_vertex_layout_handle_t layoutHandle;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • DATA, SIZE, STARTVERTEX, STRIDE, HANDLE, LAYOUTHANDLE

        The struct member offsets.
    • Constructor Detail

      • BGFXTransientVertexBuffer

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

        public java.nio.ByteBuffer data()
        Returns a ByteBuffer view of the data pointed to by the data field.
      • size

        public int size()
        Returns the value of the size field.
      • startVertex

        public int startVertex()
        Returns the value of the startVertex field.
      • stride

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

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

        public short layoutHandle()
        Returns the value of the layoutHandle field.
      • data

        public BGFXTransientVertexBuffer data​(java.nio.ByteBuffer value)
        Sets the address of the specified ByteBuffer to the data field.
      • startVertex

        public BGFXTransientVertexBuffer startVertex​(int value)
        Sets the specified value to the startVertex field.
      • layoutHandle

        public BGFXTransientVertexBuffer layoutHandle​(short value)
        Sets the specified value to the layoutHandle field.
      • set

        public BGFXTransientVertexBuffer set​(java.nio.ByteBuffer data,
                                             int startVertex,
                                             short stride,
                                             short handle,
                                             short layoutHandle)
        Initializes this struct with the specified values.
      • malloc

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

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

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

        public static BGFXTransientVertexBuffer callocStack()
        Returns a new BGFXTransientVertexBuffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • callocStack

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

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

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

        public static int nstartVertex​(long struct)
        Unsafe version of startVertex().
      • nstride

        public static short nstride​(long struct)
        Unsafe version of stride().
      • nhandle

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

        public static short nlayoutHandle​(long struct)
        Unsafe version of layoutHandle().
      • 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.
      • nstartVertex

        public static void nstartVertex​(long struct,
                                        int value)
        Unsafe version of startVertex.
      • nstride

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

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

        public static void nlayoutHandle​(long struct,
                                         short value)
        Unsafe version of layoutHandle.
      • validate

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

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array