Top Description Inners Fields Constructors Methods
org.lwjgl.bgfx

public Class BGFXVertexLayout

extends Struct<BGFXVertexLayout>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct bgfx_vertex_layout_t
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Vertex layout.

Layout


struct bgfx_vertex_layout_t {
    uint32_t hash;
    uint16_t stride;
    uint16_t offset[BGFX_ATTRIB_COUNT];
    uint16_t attributes[BGFX_ATTRIB_COUNT];
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
ATTRIBUTES

The struct member offsets.

public static final int
HASH

The struct member offsets.

public static final int
OFFSET

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STRIDE

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
BGFXVertexLayout(long address, ByteBuffer container)

public
BGFXVertexLayout(ByteBuffer container)

Creates a BGFXVertexLayout instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public ShortBuffer

Returns:

a ShortBuffer view of the attributes field.
attributes
()

public short

Returns:

the value at the specified index of the attributes field.
attributes
(int index)

public BGFXVertexLayout
attributes(ShortBuffer value)

Copies the specified ShortBuffer to the attributes field.

public BGFXVertexLayout
attributes(int index, short value)

Sets the specified value at the specified index of the attributes field.

public static BGFXVertexLayout
calloc()

Returns a new BGFXVertexLayout instance allocated with memCalloc.

public static BGFXVertexLayout.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new BGFXVertexLayout.Buffer instance allocated with memCalloc.

public static BGFXVertexLayout
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new BGFXVertexLayout instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static BGFXVertexLayout.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new BGFXVertexLayout.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static BGFXVertexLayout
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXVertexLayout
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXVertexLayout.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXVertexLayout.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected BGFXVertexLayout
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static BGFXVertexLayout
create()

Returns a new BGFXVertexLayout instance allocated with BufferUtils.

public static BGFXVertexLayout
create(long address)

Returns a new BGFXVertexLayout instance for the specified memory address.

public static BGFXVertexLayout.Buffer
create(int
the buffer capacity
capacity
)

Returns a new BGFXVertexLayout.Buffer instance allocated with BufferUtils.

public static BGFXVertexLayout.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a BGFXVertexLayout.Buffer instance at the specified memory.

public static BGFXVertexLayout
createSafe(long address)

Like create, but returns null if address is NULL.

public static BGFXVertexLayout.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int

Returns:

the value of the hash field.
hash
()

public BGFXVertexLayout
hash(int value)

Sets the specified value to the hash field.

public static BGFXVertexLayout
malloc()

Returns a new BGFXVertexLayout instance allocated with memAlloc.

public static BGFXVertexLayout.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new BGFXVertexLayout.Buffer instance allocated with memAlloc.

public static BGFXVertexLayout
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new BGFXVertexLayout instance allocated on the specified MemoryStack.

public static BGFXVertexLayout.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new BGFXVertexLayout.Buffer instance allocated on the specified MemoryStack.

public static BGFXVertexLayout
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXVertexLayout
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXVertexLayout.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXVertexLayout.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static ShortBuffer
nattributes(long struct)

Unsafe version of attributes.

public static short
nattributes(long struct, int index)

Unsafe version of attributes.

public static void
nattributes(long struct, ShortBuffer value)

Unsafe version of attributes.

public static void
nattributes(long struct, int index, short value)

Unsafe version of attributes.

public static int
nhash(long struct)

Unsafe version of hash.

public static void
nhash(long struct, int value)

Unsafe version of hash.

public static ShortBuffer
noffset(long struct)

Unsafe version of offset.

public static short
noffset(long struct, int index)

Unsafe version of offset.

public static void
noffset(long struct, ShortBuffer value)

Unsafe version of offset.

public static void
noffset(long struct, int index, short value)

Unsafe version of offset.

public static short
nstride(long struct)

Unsafe version of stride.

public static void
nstride(long struct, short value)

Unsafe version of stride.

public ShortBuffer
offset()

relative attribute offset from the vertex

public short
offset(int index)

relative attribute offset from the vertex

public BGFXVertexLayout
offset(ShortBuffer value)

Copies the specified ShortBuffer to the offset field.

public BGFXVertexLayout
offset(int index, short value)

Sets the specified value at the specified index of the offset field.

public BGFXVertexLayout
set(int hash, short stride, ShortBuffer offset, ShortBuffer attributes)

Initializes this struct with the specified values.

public BGFXVertexLayout

Returns:

this struct
set
(BGFXVertexLayout
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public short
stride()

vertex stride

public BGFXVertexLayout
stride(short value)

Sets the specified value to the stride field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

ATTRIBUTESback to summary
public static final int ATTRIBUTES

The struct member offsets.

HASHback to summary
public static final int HASH

The struct member offsets.

OFFSETback to summary
public static final int OFFSET

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

STRIDEback to summary
public static final int STRIDE

The struct member offsets.

Constructor Detail

BGFXVertexLayoutback to summary
protected BGFXVertexLayout(long address, ByteBuffer container)
BGFXVertexLayoutback to summary
public BGFXVertexLayout(ByteBuffer container)

Creates a 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.

Method Detail

attributesback to summary
public ShortBuffer attributes()
Returns:ShortBuffer

a ShortBuffer view of the attributes field.

Annotations
@NativeType:uint16_t[BGFX_ATTRIB_COUNT]
attributesback to summary
public short attributes(int index)
Returns:short

the value at the specified index of the attributes field.

Annotations
@NativeType:uint16_t
attributesback to summary
public BGFXVertexLayout attributes(ShortBuffer value)

Copies the specified ShortBuffer to the attributes field.

attributesback to summary
public BGFXVertexLayout attributes(int index, short value)

Sets the specified value at the specified index of the attributes field.

callocback to summary
public static BGFXVertexLayout calloc()

Returns a new BGFXVertexLayout instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static BGFXVertexLayout.Buffer calloc(int capacity)

Returns a new BGFXVertexLayout.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static BGFXVertexLayout calloc(MemoryStack stack)

Returns a new BGFXVertexLayout instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static BGFXVertexLayout.Buffer calloc(int capacity, MemoryStack stack)

Returns a new BGFXVertexLayout.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

callocStackback to summary
public static BGFXVertexLayout callocStack()

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static BGFXVertexLayout callocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static BGFXVertexLayout.Buffer callocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static BGFXVertexLayout.Buffer callocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
createback to summary
protected BGFXVertexLayout create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static BGFXVertexLayout create()

Returns a new BGFXVertexLayout instance allocated with BufferUtils.

createback to summary
public static BGFXVertexLayout create(long address)

Returns a new BGFXVertexLayout instance for the specified memory address.

createback to summary
public static BGFXVertexLayout.Buffer create(int capacity)

Returns a new BGFXVertexLayout.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static BGFXVertexLayout.Buffer create(long address, int capacity)

Create a BGFXVertexLayout.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static BGFXVertexLayout createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static BGFXVertexLayout.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
hashback to summary
public int hash()
Returns:int

the value of the hash field.

Annotations
@NativeType:uint32_t
hashback to summary
public BGFXVertexLayout hash(int value)

Sets the specified value to the hash field.

mallocback to summary
public static BGFXVertexLayout malloc()

Returns a new BGFXVertexLayout instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static BGFXVertexLayout.Buffer malloc(int capacity)

Returns a new BGFXVertexLayout.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static BGFXVertexLayout malloc(MemoryStack stack)

Returns a new BGFXVertexLayout instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static BGFXVertexLayout.Buffer malloc(int capacity, MemoryStack stack)

Returns a new BGFXVertexLayout.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

mallocStackback to summary
public static BGFXVertexLayout mallocStack()

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static BGFXVertexLayout mallocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static BGFXVertexLayout.Buffer mallocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static BGFXVertexLayout.Buffer mallocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
nattributesback to summary
public static ShortBuffer nattributes(long struct)

Unsafe version of attributes.

nattributesback to summary
public static short nattributes(long struct, int index)

Unsafe version of attributes.

nattributesback to summary
public static void nattributes(long struct, ShortBuffer value)

Unsafe version of attributes.

nattributesback to summary
public static void nattributes(long struct, int index, short value)

Unsafe version of attributes.

nhashback to summary
public static int nhash(long struct)

Unsafe version of hash.

nhashback to summary
public static void nhash(long struct, int value)

Unsafe version of hash.

noffsetback to summary
public static ShortBuffer noffset(long struct)

Unsafe version of offset.

noffsetback to summary
public static short noffset(long struct, int index)

Unsafe version of offset.

noffsetback to summary
public static void noffset(long struct, ShortBuffer value)

Unsafe version of offset.

noffsetback to summary
public static void noffset(long struct, int index, short value)

Unsafe version of offset.

nstrideback to summary
public static short nstride(long struct)

Unsafe version of stride.

nstrideback to summary
public static void nstride(long struct, short value)

Unsafe version of stride.

offsetback to summary
public ShortBuffer offset()

relative attribute offset from the vertex

Annotations
@NativeType:uint16_t[BGFX_ATTRIB_COUNT]
offsetback to summary
public short offset(int index)

relative attribute offset from the vertex

Annotations
@NativeType:uint16_t
offsetback to summary
public BGFXVertexLayout offset(ShortBuffer value)

Copies the specified ShortBuffer to the offset field.

offsetback to summary
public BGFXVertexLayout offset(int index, short value)

Sets the specified value at the specified index of the offset field.

setback to summary
public BGFXVertexLayout set(int hash, short stride, ShortBuffer offset, ShortBuffer attributes)

Initializes this struct with the specified values.

setback to summary
public BGFXVertexLayout set(BGFXVertexLayout src)

Copies the specified struct data to this struct.

Parameters
src:BGFXVertexLayout

the source struct

Returns:BGFXVertexLayout

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
strideback to summary
public short stride()

vertex stride

Annotations
@NativeType:uint16_t
strideback to summary
public BGFXVertexLayout stride(short value)

Sets the specified value to the stride field.

org.lwjgl.bgfx back to summary

public Class BGFXVertexLayout.Buffer

extends StructBuffer<BGFXVertexLayout, BGFXVertexLayout.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of BGFXVertexLayout structs.

Field Summary

Modifier and TypeField and Description
private static final BGFXVertexLayout

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new BGFXVertexLayout.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public ShortBuffer

Returns:

a ShortBuffer view of the attributes field.
attributes
()

public short

Returns:

the value at the specified index of the attributes field.
attributes
(int index)

public BGFXVertexLayout.Buffer
attributes(ShortBuffer value)

Copies the specified ShortBuffer to the attributes field.

public BGFXVertexLayout.Buffer
attributes(int index, short value)

Sets the specified value at the specified index of the attributes field.

protected BGFXVertexLayout
public int

Returns:

the value of the hash field.
hash
()

public BGFXVertexLayout.Buffer
hash(int value)

Sets the specified value to the hash field.

public ShortBuffer

Returns:

a ShortBuffer view of the BGFXVertexLayout#offset field.
offset
()

public short

Returns:

the value at the specified index of the BGFXVertexLayout#offset field.
offset
(int index)

public BGFXVertexLayout.Buffer
offset(ShortBuffer value)

Copies the specified ShortBuffer to the BGFXVertexLayout#offset field.

public BGFXVertexLayout.Buffer
offset(int index, short value)

Sets the specified value at the specified index of the BGFXVertexLayout#offset field.

protected BGFXVertexLayout.Buffer
public short

Returns:

the value of the BGFXVertexLayout#stride field.
stride
()

public BGFXVertexLayout.Buffer
stride(short value)

Sets the specified value to the BGFXVertexLayout#stride field.

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final BGFXVertexLayout ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
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.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

attributesback to summary
public ShortBuffer attributes()
Returns:ShortBuffer

a ShortBuffer view of the attributes field.

Annotations
@NativeType:uint16_t[BGFX_ATTRIB_COUNT]
attributesback to summary
public short attributes(int index)
Returns:short

the value at the specified index of the attributes field.

Annotations
@NativeType:uint16_t
attributesback to summary
public BGFXVertexLayout.Buffer attributes(ShortBuffer value)

Copies the specified ShortBuffer to the attributes field.

attributesback to summary
public BGFXVertexLayout.Buffer attributes(int index, short value)

Sets the specified value at the specified index of the attributes field.

getElementFactoryback to summary
protected BGFXVertexLayout getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
hashback to summary
public int hash()
Returns:int

the value of the hash field.

Annotations
@NativeType:uint32_t
hashback to summary
public BGFXVertexLayout.Buffer hash(int value)

Sets the specified value to the hash field.

offsetback to summary
public ShortBuffer offset()
Returns:ShortBuffer

a ShortBuffer view of the BGFXVertexLayout#offset field.

Annotations
@NativeType:uint16_t[BGFX_ATTRIB_COUNT]
offsetback to summary
public short offset(int index)
Returns:short

the value at the specified index of the BGFXVertexLayout#offset field.

Annotations
@NativeType:uint16_t
offsetback to summary
public BGFXVertexLayout.Buffer offset(ShortBuffer value)

Copies the specified ShortBuffer to the BGFXVertexLayout#offset field.

offsetback to summary
public BGFXVertexLayout.Buffer offset(int index, short value)

Sets the specified value at the specified index of the BGFXVertexLayout#offset field.

selfback to summary
protected BGFXVertexLayout.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
strideback to summary
public short stride()
Returns:short

the value of the BGFXVertexLayout#stride field.

Annotations
@NativeType:uint16_t
strideback to summary
public BGFXVertexLayout.Buffer stride(short value)

Sets the specified value to the BGFXVertexLayout#stride field.