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.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe 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 aBGFXVertexLayoutinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionshortattributes(int index) attributes(int index, short value) Sets the specified value at the specified index of theattributesfield.attributes(ShortBuffer value) Copies the specifiedShortBufferto theattributesfield.static BGFXVertexLayoutcalloc()Returns a newBGFXVertexLayoutinstance allocated withmemCalloc.static BGFXVertexLayout.Buffercalloc(int capacity) Returns a newBGFXVertexLayout.Bufferinstance allocated withmemCalloc.static BGFXVertexLayout.Buffercalloc(int capacity, MemoryStack stack) Returns a newBGFXVertexLayout.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXVertexLayoutcalloc(MemoryStack stack) Returns a newBGFXVertexLayoutinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXVertexLayoutcreate()Returns a newBGFXVertexLayoutinstance allocated withBufferUtils.static BGFXVertexLayout.Buffercreate(int capacity) Returns a newBGFXVertexLayout.Bufferinstance allocated withBufferUtils.static BGFXVertexLayoutcreate(long address) Returns a newBGFXVertexLayoutinstance for the specified memory address.static BGFXVertexLayout.Buffercreate(long address, int capacity) Create aBGFXVertexLayout.Bufferinstance at the specified memory.static @Nullable BGFXVertexLayoutcreateSafe(long address) static @Nullable BGFXVertexLayout.BuffercreateSafe(long address, int capacity) inthash()hash(int value) Sets the specified value to thehashfield.static BGFXVertexLayoutmalloc()Returns a newBGFXVertexLayoutinstance allocated withmemAlloc.static BGFXVertexLayout.Buffermalloc(int capacity) Returns a newBGFXVertexLayout.Bufferinstance allocated withmemAlloc.static BGFXVertexLayout.Buffermalloc(int capacity, MemoryStack stack) Returns a newBGFXVertexLayout.Bufferinstance allocated on the specifiedMemoryStack.static BGFXVertexLayoutmalloc(MemoryStack stack) Returns a newBGFXVertexLayoutinstance allocated on the specifiedMemoryStack.static ShortBuffernattributes(long struct) Unsafe version ofattributes().static shortnattributes(long struct, int index) Unsafe version ofattributes.static voidnattributes(long struct, int index, short value) Unsafe version ofattributes.static voidnattributes(long struct, ShortBuffer value) Unsafe version ofattributes.static intnhash(long struct) Unsafe version ofhash().static voidnhash(long struct, int value) Unsafe version ofhash.static ShortBuffernoffset(long struct) Unsafe version ofoffset().static shortnoffset(long struct, int index) Unsafe version ofoffset.static voidnoffset(long struct, int index, short value) Unsafe version ofoffset.static voidnoffset(long struct, ShortBuffer value) Unsafe version ofoffset.static shortnstride(long struct) Unsafe version ofstride().static voidnstride(long struct, short value) Unsafe version ofstride.offset()shortoffset(int index) offset(int index, short value) Sets the specified value at the specified index of theoffsetfield.offset(ShortBuffer value) Copies the specifiedShortBufferto theoffsetfield.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.intsizeof()Returnssizeof(struct).shortstride()stride(short value) Sets the specified value to thestridefield.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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 aBGFXVertexLayoutinstance at the current position of the specifiedByteBuffercontainer. 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:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<BGFXVertexLayout>
-
hash
public int hash()- Returns:
- the value of the
hashfield.
-
stride
public short stride()- Returns:
- the value of the
stridefield.
-
offset
- Returns:
- a
ShortBufferview of theoffsetfield.
-
offset
public short offset(int index) - Returns:
- the value at the specified index of the
offsetfield.
-
attributes
- Returns:
- a
ShortBufferview of theattributesfield.
-
attributes
public short attributes(int index) - Returns:
- the value at the specified index of the
attributesfield.
-
hash
Sets the specified value to thehashfield. -
stride
Sets the specified value to thestridefield. -
offset
Copies the specifiedShortBufferto theoffsetfield. -
offset
Sets the specified value at the specified index of theoffsetfield. -
attributes
Copies the specifiedShortBufferto theattributesfield. -
attributes
Sets the specified value at the specified index of theattributesfield. -
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 newBGFXVertexLayoutinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newBGFXVertexLayoutinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newBGFXVertexLayoutinstance allocated withBufferUtils. -
create
Returns a newBGFXVertexLayoutinstance for the specified memory address. -
createSafe
-
malloc
Returns a newBGFXVertexLayout.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newBGFXVertexLayout.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newBGFXVertexLayout.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aBGFXVertexLayout.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newBGFXVertexLayoutinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newBGFXVertexLayoutinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newBGFXVertexLayout.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newBGFXVertexLayout.Bufferinstance allocated on the specifiedMemoryStackand 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.
-