Class BGFXTransientVertexBuffer

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

    public class BGFXTransientVertexBuffer
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Transient vertex buffer.

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

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

        public int size()
        data size
      • startVertex

        public int startVertex()
        first vertex
      • stride

        public short stride()
        vertex stride
      • handle

        public short handle()
        vertex buffer handle
      • layoutHandle

        public short layoutHandle()
        vertex layout handle
      • 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()
        Returns a new BGFXTransientVertexBuffer instance allocated with BufferUtils.
      • create

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

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

        public static BGFXTransientVertexBuffer calloc​(org.lwjgl.system.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
      • calloc

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