public class BGFXVertexLayout
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
stride – vertex strideoffset[BGFX_ATTRIB_COUNT] – relative attribute offset from the vertex
struct bgfx_vertex_layout_t {
uint32_t hash;
uint16_t stride;
uint16_t offset[BGFX_ATTRIB_COUNT];
uint16_t attributes[BGFX_ATTRIB_COUNT];
}| Modifier and Type | Class and Description |
|---|---|
static class |
BGFXVertexLayout.Buffer
An array of
BGFXVertexLayout structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
ATTRIBUTES
The struct member offsets.
|
static int |
HASH
The struct member offsets.
|
static int |
OFFSET
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STRIDE
The struct member offsets.
|
| Constructor and Description |
|---|
BGFXVertexLayout(java.nio.ByteBuffer container)
Creates a
BGFXVertexLayout instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
java.nio.ShortBuffer |
attributes()
Returns a
ShortBuffer view of the attributes field. |
short |
attributes(int index)
Returns the value at the specified index of the
attributes field. |
BGFXVertexLayout |
attributes(int index,
short value)
Sets the specified value at the specified index of the
attributes field. |
BGFXVertexLayout |
attributes(java.nio.ShortBuffer value)
Copies the specified
ShortBuffer to the attributes field. |
static BGFXVertexLayout |
calloc()
Returns a new
BGFXVertexLayout instance allocated with memCalloc. |
static BGFXVertexLayout.Buffer |
calloc(int capacity)
Returns a new
BGFXVertexLayout.Buffer instance allocated with memCalloc. |
static BGFXVertexLayout |
callocStack()
Returns a new
BGFXVertexLayout instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static BGFXVertexLayout.Buffer |
callocStack(int capacity)
Returns a new
BGFXVertexLayout.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static BGFXVertexLayout.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXVertexLayout.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static BGFXVertexLayout |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXVertexLayout instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static BGFXVertexLayout |
create()
Returns a new
BGFXVertexLayout instance allocated with BufferUtils. |
static BGFXVertexLayout.Buffer |
create(int capacity)
Returns a new
BGFXVertexLayout.Buffer instance allocated with BufferUtils. |
static BGFXVertexLayout |
create(long address)
Returns a new
BGFXVertexLayout instance for the specified memory address. |
static BGFXVertexLayout.Buffer |
create(long address,
int capacity)
Create a
BGFXVertexLayout.Buffer instance at the specified memory. |
static BGFXVertexLayout |
createSafe(long address)
|
static BGFXVertexLayout.Buffer |
createSafe(long address,
int capacity)
|
int |
hash()
Returns the value of the
hash field. |
BGFXVertexLayout |
hash(int value)
Sets the specified value to the
hash field. |
static BGFXVertexLayout |
malloc()
Returns a new
BGFXVertexLayout instance allocated with memAlloc. |
static BGFXVertexLayout.Buffer |
malloc(int capacity)
Returns a new
BGFXVertexLayout.Buffer instance allocated with memAlloc. |
static BGFXVertexLayout |
mallocStack()
Returns a new
BGFXVertexLayout instance allocated on the thread-local MemoryStack. |
static BGFXVertexLayout.Buffer |
mallocStack(int capacity)
Returns a new
BGFXVertexLayout.Buffer instance allocated on the thread-local MemoryStack. |
static BGFXVertexLayout.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXVertexLayout.Buffer instance allocated on the specified MemoryStack. |
static BGFXVertexLayout |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXVertexLayout instance allocated on the specified MemoryStack. |
static java.nio.ShortBuffer |
nattributes(long struct)
Unsafe version of
attributes(). |
static short |
nattributes(long struct,
int index)
Unsafe version of
attributes. |
static void |
nattributes(long struct,
int index,
short value)
Unsafe version of
attributes. |
static void |
nattributes(long struct,
java.nio.ShortBuffer value)
Unsafe version of
attributes. |
static int |
nhash(long struct)
Unsafe version of
hash(). |
static void |
nhash(long struct,
int value)
Unsafe version of
hash. |
static java.nio.ShortBuffer |
noffset(long struct)
Unsafe version of
offset(). |
static short |
noffset(long struct,
int index)
Unsafe version of
offset. |
static void |
noffset(long struct,
int index,
short value)
Unsafe version of
offset. |
static void |
noffset(long struct,
java.nio.ShortBuffer value)
Unsafe version of
offset. |
static short |
nstride(long struct)
Unsafe version of
stride(). |
static void |
nstride(long struct,
short value)
Unsafe version of
stride. |
java.nio.ShortBuffer |
offset()
Returns a
ShortBuffer view of the offset field. |
short |
offset(int index)
Returns the value at the specified index of the
offset field. |
BGFXVertexLayout |
offset(int index,
short value)
Sets the specified value at the specified index of the
offset field. |
BGFXVertexLayout |
offset(java.nio.ShortBuffer value)
Copies the specified
ShortBuffer to the offset field. |
BGFXVertexLayout |
set(BGFXVertexLayout src)
Copies the specified struct data to this struct.
|
BGFXVertexLayout |
set(int hash,
short stride,
java.nio.ShortBuffer offset,
java.nio.ShortBuffer attributes)
Initializes this struct with the specified values.
|
int |
sizeof() |
short |
stride()
Returns the value of the
stride field. |
BGFXVertexLayout |
stride(short value)
Sets the specified value to the
stride field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int HASH
public static final int STRIDE
public static final int OFFSET
public static final int ATTRIBUTES
public BGFXVertexLayout(java.nio.ByteBuffer container)
BGFXVertexLayout 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int hash()
hash field.public short stride()
stride field.public java.nio.ShortBuffer offset()
ShortBuffer view of the offset field.public short offset(int index)
offset field.public java.nio.ShortBuffer attributes()
ShortBuffer view of the attributes field.public short attributes(int index)
attributes field.public BGFXVertexLayout hash(int value)
hash field.public BGFXVertexLayout stride(short value)
stride field.public BGFXVertexLayout offset(java.nio.ShortBuffer value)
ShortBuffer to the offset field.public BGFXVertexLayout offset(int index, short value)
offset field.public BGFXVertexLayout attributes(java.nio.ShortBuffer value)
ShortBuffer to the attributes field.public BGFXVertexLayout attributes(int index, short value)
attributes field.public BGFXVertexLayout set(int hash, short stride, java.nio.ShortBuffer offset, java.nio.ShortBuffer attributes)
public BGFXVertexLayout set(BGFXVertexLayout src)
src - the source structpublic static BGFXVertexLayout malloc()
BGFXVertexLayout instance allocated with memAlloc. The instance must be explicitly freed.public static BGFXVertexLayout calloc()
BGFXVertexLayout instance allocated with memCalloc. The instance must be explicitly freed.public static BGFXVertexLayout create()
BGFXVertexLayout instance allocated with BufferUtils.public static BGFXVertexLayout create(long address)
BGFXVertexLayout instance for the specified memory address.@Nullable public static BGFXVertexLayout createSafe(long address)
public static BGFXVertexLayout.Buffer malloc(int capacity)
BGFXVertexLayout.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static BGFXVertexLayout.Buffer calloc(int capacity)
BGFXVertexLayout.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static BGFXVertexLayout.Buffer create(int capacity)
BGFXVertexLayout.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static BGFXVertexLayout.Buffer create(long address, int capacity)
BGFXVertexLayout.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static BGFXVertexLayout.Buffer createSafe(long address, int capacity)
public static BGFXVertexLayout mallocStack()
BGFXVertexLayout instance allocated on the thread-local MemoryStack.public static BGFXVertexLayout callocStack()
BGFXVertexLayout instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static BGFXVertexLayout mallocStack(org.lwjgl.system.MemoryStack stack)
BGFXVertexLayout instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static BGFXVertexLayout callocStack(org.lwjgl.system.MemoryStack stack)
BGFXVertexLayout instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static BGFXVertexLayout.Buffer mallocStack(int capacity)
BGFXVertexLayout.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static BGFXVertexLayout.Buffer callocStack(int capacity)
BGFXVertexLayout.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static BGFXVertexLayout.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
BGFXVertexLayout.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static BGFXVertexLayout.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
BGFXVertexLayout.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nhash(long struct)
hash().public static short nstride(long struct)
stride().public static java.nio.ShortBuffer noffset(long struct)
offset().public static short noffset(long struct,
int index)
offset.public static java.nio.ShortBuffer nattributes(long struct)
attributes().public static short nattributes(long struct,
int index)
attributes.public static void nhash(long struct,
int value)
hash.public static void nstride(long struct,
short value)
stride.public static void noffset(long struct,
java.nio.ShortBuffer value)
offset.public static void noffset(long struct,
int index,
short value)
offset.public static void nattributes(long struct,
java.nio.ShortBuffer value)
attributes.public static void nattributes(long struct,
int index,
short value)
attributes.Copyright LWJGL. All Rights Reserved. License terms.