Package org.lwjgl.bgfx
Class BGFXVertexLayout
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct bgfx_vertex_layout_t {
uint32_t hash;
uint16_t stride;
uint16_t offset[BGFX_ATTRIB_COUNT];
uint16_t attributes[BGFX_ATTRIB_COUNT];
}
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionBGFXVertexLayout
(ByteBuffer container) Creates aBGFXVertexLayout
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionshort
attributes
(int index) attributes
(int index, short value) Sets the specified value at the specified index of theattributes
field.attributes
(ShortBuffer value) Copies the specifiedShortBuffer
to theattributes
field.static BGFXVertexLayout
calloc()
Returns a newBGFXVertexLayout
instance allocated withmemCalloc
.static BGFXVertexLayout.Buffer
calloc
(int capacity) Returns a newBGFXVertexLayout.Buffer
instance allocated withmemCalloc
.static BGFXVertexLayout.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newBGFXVertexLayout.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXVertexLayout
calloc
(MemoryStack stack) Returns a newBGFXVertexLayout
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXVertexLayout
Deprecated.static BGFXVertexLayout.Buffer
callocStack
(int capacity) Deprecated.static BGFXVertexLayout.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static BGFXVertexLayout
callocStack
(MemoryStack stack) Deprecated.static BGFXVertexLayout
create()
Returns a newBGFXVertexLayout
instance allocated withBufferUtils
.static BGFXVertexLayout.Buffer
create
(int capacity) Returns a newBGFXVertexLayout.Buffer
instance allocated withBufferUtils
.static BGFXVertexLayout
create
(long address) Returns a newBGFXVertexLayout
instance for the specified memory address.static BGFXVertexLayout.Buffer
create
(long address, int capacity) Create aBGFXVertexLayout.Buffer
instance at the specified memory.static @Nullable BGFXVertexLayout
createSafe
(long address) static @Nullable BGFXVertexLayout.Buffer
createSafe
(long address, int capacity) int
hash()
hash
(int value) Sets the specified value to thehash
field.static BGFXVertexLayout
malloc()
Returns a newBGFXVertexLayout
instance allocated withmemAlloc
.static BGFXVertexLayout.Buffer
malloc
(int capacity) Returns a newBGFXVertexLayout.Buffer
instance allocated withmemAlloc
.static BGFXVertexLayout.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newBGFXVertexLayout.Buffer
instance allocated on the specifiedMemoryStack
.static BGFXVertexLayout
malloc
(MemoryStack stack) Returns a newBGFXVertexLayout
instance allocated on the specifiedMemoryStack
.static BGFXVertexLayout
Deprecated.static BGFXVertexLayout.Buffer
mallocStack
(int capacity) Deprecated.static BGFXVertexLayout.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static BGFXVertexLayout
mallocStack
(MemoryStack stack) Deprecated.static ShortBuffer
nattributes
(long struct) Unsafe version ofattributes()
.static short
nattributes
(long struct, int index) Unsafe version ofattributes
.static void
nattributes
(long struct, int index, short value) Unsafe version ofattributes
.static void
nattributes
(long struct, ShortBuffer value) Unsafe version ofattributes
.static int
nhash
(long struct) Unsafe version ofhash()
.static void
nhash
(long struct, int value) Unsafe version ofhash
.static ShortBuffer
noffset
(long struct) Unsafe version ofoffset()
.static short
noffset
(long struct, int index) Unsafe version ofoffset
.static void
noffset
(long struct, int index, short value) Unsafe version ofoffset
.static void
noffset
(long struct, ShortBuffer value) Unsafe version ofoffset
.static short
nstride
(long struct) Unsafe version ofstride()
.static void
nstride
(long struct, short value) Unsafe version ofstride
.offset()
short
offset
(int index) offset
(int index, short value) Sets the specified value at the specified index of theoffset
field.offset
(ShortBuffer value) Copies the specifiedShortBuffer
to theoffset
field.set
(int hash, short stride, ShortBuffer offset, ShortBuffer attributes) Initializes this struct with the specified values.set
(BGFXVertexLayout src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.short
stride()
stride
(short value) Sets the specified value to thestride
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
HASH
public static final int HASHThe struct member offsets. -
STRIDE
public static final int STRIDEThe struct member offsets. -
OFFSET
public static final int OFFSETThe struct member offsets. -
ATTRIBUTES
public static final int ATTRIBUTESThe struct member offsets.
-
-
Constructor Details
-
BGFXVertexLayout
Creates aBGFXVertexLayout
instance at the current position of the specifiedByteBuffer
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<BGFXVertexLayout>
-
hash
public int hash()- Returns:
- the value of the
hash
field.
-
stride
public short stride()- Returns:
- the value of the
stride
field.
-
offset
- Returns:
- a
ShortBuffer
view of theoffset
field.
-
offset
public short offset(int index) - Returns:
- the value at the specified index of the
offset
field.
-
attributes
- Returns:
- a
ShortBuffer
view of theattributes
field.
-
attributes
public short attributes(int index) - Returns:
- the value at the specified index of the
attributes
field.
-
hash
Sets the specified value to thehash
field. -
stride
Sets the specified value to thestride
field. -
offset
Copies the specifiedShortBuffer
to theoffset
field. -
offset
Sets the specified value at the specified index of theoffset
field. -
attributes
Copies the specifiedShortBuffer
to theattributes
field. -
attributes
Sets the specified value at the specified index of theattributes
field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newBGFXVertexLayout
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newBGFXVertexLayout
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newBGFXVertexLayout
instance allocated withBufferUtils
. -
create
Returns a newBGFXVertexLayout
instance for the specified memory address. -
createSafe
-
malloc
Returns a newBGFXVertexLayout.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newBGFXVertexLayout.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newBGFXVertexLayout.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aBGFXVertexLayout.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newBGFXVertexLayout
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newBGFXVertexLayout
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newBGFXVertexLayout.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newBGFXVertexLayout.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nhash
public static int nhash(long struct) Unsafe version ofhash()
. -
nstride
public static short nstride(long struct) Unsafe version ofstride()
. -
noffset
Unsafe version ofoffset()
. -
noffset
public static short noffset(long struct, int index) Unsafe version ofoffset
. -
nattributes
Unsafe version ofattributes()
. -
nattributes
public static short nattributes(long struct, int index) Unsafe version ofattributes
. -
nhash
public static void nhash(long struct, int value) Unsafe version ofhash
. -
nstride
public static void nstride(long struct, short value) Unsafe version ofstride
. -
noffset
Unsafe version ofoffset
. -
noffset
public static void noffset(long struct, int index, short value) Unsafe version ofoffset
. -
nattributes
Unsafe version ofattributes
. -
nattributes
public static void nattributes(long struct, int index, short value) Unsafe version ofattributes
.
-