Class BGFXVertexLayout.Buffer

All Implemented Interfaces:
AutoCloseable, Iterable<BGFXVertexLayout>, NativeResource, Pointer
Enclosing class:
BGFXVertexLayout

public static class BGFXVertexLayout.Buffer extends StructBuffer<BGFXVertexLayout,BGFXVertexLayout.Buffer> implements NativeResource
An array of BGFXVertexLayout structs.
  • Constructor Details

    • Buffer

      public Buffer(ByteBuffer container)
      Creates a new BGFXVertexLayout.Buffer instance backed by the specified container.

      Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by BGFXVertexLayout.SIZEOF, and its mark will be undefined.

      The created buffer instance holds a strong reference to the container object.

    • Buffer

      public Buffer(long address, int cap)
  • Method Details

    • hash

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

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

      public ShortBuffer offset()
      Returns:
      a ShortBuffer view of the offset field.
    • offset

      public short offset(int index)
      Returns:
      the value at the specified index of the offset field.
    • attributes

      public ShortBuffer attributes()
      Returns:
      a ShortBuffer view of the attributes field.
    • attributes

      public short attributes(int index)
      Returns:
      the value at the specified index of the attributes field.
    • hash

      public BGFXVertexLayout.Buffer hash(int value)
      Sets the specified value to the hash field.
    • stride

      public BGFXVertexLayout.Buffer stride(short value)
      Sets the specified value to the stride field.
    • offset

      public BGFXVertexLayout.Buffer offset(ShortBuffer value)
      Copies the specified ShortBuffer to the offset field.
    • offset

      public BGFXVertexLayout.Buffer offset(int index, short value)
      Sets the specified value at the specified index of the offset field.
    • attributes

      public BGFXVertexLayout.Buffer attributes(ShortBuffer value)
      Copies the specified ShortBuffer to the attributes field.
    • attributes

      public BGFXVertexLayout.Buffer attributes(int index, short value)
      Sets the specified value at the specified index of the attributes field.