Package org.lwjgl.bgfx
Class BGFXVertexLayout
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.bgfx.BGFXVertexLayout
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class BGFXVertexLayout extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBGFXVertexLayout.BufferAn array ofBGFXVertexLayoutstructs.
-
Constructor Summary
Constructors Constructor Description BGFXVertexLayout(java.nio.ByteBuffer container)Creates aBGFXVertexLayoutinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.nio.ShortBufferattributes()shortattributes(int index)BGFXVertexLayoutattributes(int index, short value)Sets the specified value at the specified index of theattributesfield.BGFXVertexLayoutattributes(java.nio.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, org.lwjgl.system.MemoryStack stack)Returns a newBGFXVertexLayout.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXVertexLayoutcalloc(org.lwjgl.system.MemoryStack stack)Returns a newBGFXVertexLayoutinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXVertexLayoutcallocStack()Deprecated.static BGFXVertexLayout.BuffercallocStack(int capacity)Deprecated.static BGFXVertexLayout.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXVertexLayoutcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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 BGFXVertexLayoutcreateSafe(long address)static BGFXVertexLayout.BuffercreateSafe(long address, int capacity)inthash()BGFXVertexLayouthash(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, org.lwjgl.system.MemoryStack stack)Returns a newBGFXVertexLayout.Bufferinstance allocated on the specifiedMemoryStack.static BGFXVertexLayoutmalloc(org.lwjgl.system.MemoryStack stack)Returns a newBGFXVertexLayoutinstance allocated on the specifiedMemoryStack.static BGFXVertexLayoutmallocStack()Deprecated.static BGFXVertexLayout.BuffermallocStack(int capacity)Deprecated.static BGFXVertexLayout.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXVertexLayoutmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static java.nio.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, java.nio.ShortBuffer value)Unsafe version ofattributes.static intnhash(long struct)Unsafe version ofhash().static voidnhash(long struct, int value)Unsafe version ofhash.static java.nio.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, java.nio.ShortBuffer value)Unsafe version ofoffset.static shortnstride(long struct)Unsafe version ofstride().static voidnstride(long struct, short value)Unsafe version ofstride.java.nio.ShortBufferoffset()relative attribute offset from the vertexshortoffset(int index)relative attribute offset from the vertexBGFXVertexLayoutoffset(int index, short value)Sets the specified value at the specified index of theoffset()field.BGFXVertexLayoutoffset(java.nio.ShortBuffer value)Copies the specifiedShortBufferto theoffset()field.BGFXVertexLayoutset(int hash, short stride, java.nio.ShortBuffer offset, java.nio.ShortBuffer attributes)Initializes this struct with the specified values.BGFXVertexLayoutset(BGFXVertexLayout src)Copies the specified struct data to this struct.intsizeof()shortstride()vertex strideBGFXVertexLayoutstride(short value)Sets the specified value to thestride()field.
-
-
-
Constructor Detail
-
BGFXVertexLayout
public BGFXVertexLayout(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
hash
public int hash()
- Returns:
- the value of the
hashfield.
-
stride
public short stride()
vertex stride
-
offset
public java.nio.ShortBuffer offset() public short offset(int index)
relative attribute offset from the vertex
-
attributes
public java.nio.ShortBuffer attributes()
- Returns:
- a
ShortBufferview of theattributesfield.
-
attributes
public short attributes(int index)
- Returns:
- the value at the specified index of the
attributesfield.
-
hash
public BGFXVertexLayout hash(int value)
Sets the specified value to thehashfield.
-
stride
public BGFXVertexLayout stride(short value)
Sets the specified value to thestride()field.
-
offset
public BGFXVertexLayout offset(java.nio.ShortBuffer value)
Copies the specifiedShortBufferto theoffset()field.
-
offset
public BGFXVertexLayout offset(int index, short value)
Sets the specified value at the specified index of theoffset()field.
-
attributes
public BGFXVertexLayout attributes(java.nio.ShortBuffer value)
Copies the specifiedShortBufferto theattributesfield.
-
attributes
public BGFXVertexLayout attributes(int index, short value)
Sets the specified value at the specified index of theattributesfield.
-
set
public BGFXVertexLayout set(int hash, short stride, java.nio.ShortBuffer offset, java.nio.ShortBuffer attributes)
Initializes this struct with the specified values.
-
set
public BGFXVertexLayout set(BGFXVertexLayout src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static BGFXVertexLayout malloc()
Returns a newBGFXVertexLayoutinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static BGFXVertexLayout calloc()
Returns a newBGFXVertexLayoutinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static BGFXVertexLayout create()
Returns a newBGFXVertexLayoutinstance allocated withBufferUtils.
-
create
public static BGFXVertexLayout create(long address)
Returns a newBGFXVertexLayoutinstance for the specified memory address.
-
createSafe
@Nullable public static BGFXVertexLayout createSafe(long address)
-
malloc
public static BGFXVertexLayout.Buffer malloc(int capacity)
Returns a newBGFXVertexLayout.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static BGFXVertexLayout.Buffer calloc(int capacity)
Returns a newBGFXVertexLayout.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static BGFXVertexLayout.Buffer create(int capacity)
Returns a newBGFXVertexLayout.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static BGFXVertexLayout.Buffer create(long address, int capacity)
Create aBGFXVertexLayout.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static BGFXVertexLayout.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static BGFXVertexLayout mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXVertexLayout callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXVertexLayout mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXVertexLayout callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXVertexLayout.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXVertexLayout.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXVertexLayout.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXVertexLayout.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static BGFXVertexLayout malloc(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXVertexLayoutinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static BGFXVertexLayout calloc(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXVertexLayoutinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static BGFXVertexLayout.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXVertexLayout.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static BGFXVertexLayout.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXVertexLayout.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nhash
public static int nhash(long struct)
Unsafe version ofhash().
-
nstride
public static short nstride(long struct)
Unsafe version ofstride().
-
noffset
public static java.nio.ShortBuffer noffset(long struct)
Unsafe version ofoffset().
-
noffset
public static short noffset(long struct, int index)Unsafe version ofoffset.
-
nattributes
public static java.nio.ShortBuffer nattributes(long struct)
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
public static void noffset(long struct, java.nio.ShortBuffer value)Unsafe version ofoffset.
-
noffset
public static void noffset(long struct, int index, short value)Unsafe version ofoffset.
-
nattributes
public static void nattributes(long struct, java.nio.ShortBuffer value)Unsafe version ofattributes.
-
nattributes
public static void nattributes(long struct, int index, short value)Unsafe version ofattributes.
-
-