Package org.lwjgl.bgfx
Class BGFXInstanceDataBuffer
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.bgfx.BGFXInstanceDataBuffer
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class BGFXInstanceDataBuffer extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBGFXInstanceDataBuffer.BufferAn array ofBGFXInstanceDataBufferstructs.
-
Constructor Summary
Constructors Constructor Description BGFXInstanceDataBuffer(java.nio.ByteBuffer container)Creates aBGFXInstanceDataBufferinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static BGFXInstanceDataBuffercalloc()Returns a newBGFXInstanceDataBufferinstance allocated withmemCalloc.static BGFXInstanceDataBuffer.Buffercalloc(int capacity)Returns a newBGFXInstanceDataBuffer.Bufferinstance allocated withmemCalloc.static BGFXInstanceDataBuffer.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newBGFXInstanceDataBuffer.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXInstanceDataBuffercalloc(org.lwjgl.system.MemoryStack stack)Returns a newBGFXInstanceDataBufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXInstanceDataBuffercallocStack()Deprecated.static BGFXInstanceDataBuffer.BuffercallocStack(int capacity)Deprecated.static BGFXInstanceDataBuffer.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXInstanceDataBuffercallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXInstanceDataBuffercreate()Returns a newBGFXInstanceDataBufferinstance allocated withBufferUtils.static BGFXInstanceDataBuffer.Buffercreate(int capacity)Returns a newBGFXInstanceDataBuffer.Bufferinstance allocated withBufferUtils.static BGFXInstanceDataBuffercreate(long address)Returns a newBGFXInstanceDataBufferinstance for the specified memory address.static BGFXInstanceDataBuffer.Buffercreate(long address, int capacity)Create aBGFXInstanceDataBuffer.Bufferinstance at the specified memory.static BGFXInstanceDataBuffercreateSafe(long address)static BGFXInstanceDataBuffer.BuffercreateSafe(long address, int capacity)java.nio.ByteBufferdata()pointer to dataBGFXInstanceDataBufferdata(java.nio.ByteBuffer value)Sets the address of the specifiedByteBufferto thedata()field.shorthandle()vertex buffer object handleBGFXInstanceDataBufferhandle(short value)Sets the specified value to thehandle()field.static BGFXInstanceDataBuffermalloc()Returns a newBGFXInstanceDataBufferinstance allocated withmemAlloc.static BGFXInstanceDataBuffer.Buffermalloc(int capacity)Returns a newBGFXInstanceDataBuffer.Bufferinstance allocated withmemAlloc.static BGFXInstanceDataBuffer.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newBGFXInstanceDataBuffer.Bufferinstance allocated on the specifiedMemoryStack.static BGFXInstanceDataBuffermalloc(org.lwjgl.system.MemoryStack stack)Returns a newBGFXInstanceDataBufferinstance allocated on the specifiedMemoryStack.static BGFXInstanceDataBuffermallocStack()Deprecated.static BGFXInstanceDataBuffer.BuffermallocStack(int capacity)Deprecated.static BGFXInstanceDataBuffer.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXInstanceDataBuffermallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static java.nio.ByteBufferndata(long struct)Unsafe version ofdata.static voidndata(long struct, java.nio.ByteBuffer value)Unsafe version ofdata.static shortnhandle(long struct)Unsafe version ofhandle().static voidnhandle(long struct, short value)Unsafe version ofhandle.static intnnum(long struct)Unsafe version ofnum().static voidnnum(long struct, int value)Unsafe version ofnum.static intnoffset(long struct)Unsafe version ofoffset().static voidnoffset(long struct, int value)Unsafe version ofoffset.static intnsize(long struct)Unsafe version ofsize().static voidnsize(long struct, int value)Sets the specified value to thesizefield of the specifiedstruct.static shortnstride(long struct)Unsafe version ofstride().static voidnstride(long struct, short value)Unsafe version ofstride.intnum()number of instancesBGFXInstanceDataBuffernum(int value)Sets the specified value to thenum()field.intoffset()offset in vertex bufferBGFXInstanceDataBufferoffset(int value)Sets the specified value to theoffset()field.BGFXInstanceDataBufferset(java.nio.ByteBuffer data, int offset, int num, short stride, short handle)Initializes this struct with the specified values.BGFXInstanceDataBufferset(BGFXInstanceDataBuffer src)Copies the specified struct data to this struct.intsize()data sizeintsizeof()shortstride()vertex strideBGFXInstanceDataBufferstride(short value)Sets the specified value to thestride()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
BGFXInstanceDataBuffer
public BGFXInstanceDataBuffer(java.nio.ByteBuffer container)
Creates aBGFXInstanceDataBufferinstance 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
-
data
public java.nio.ByteBuffer data()
pointer to data
-
size
public int size()
data size
-
offset
public int offset()
offset in vertex buffer
-
num
public int num()
number of instances
-
stride
public short stride()
vertex stride
-
handle
public short handle()
vertex buffer object handle
-
data
public BGFXInstanceDataBuffer data(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBufferto thedata()field.
-
offset
public BGFXInstanceDataBuffer offset(int value)
Sets the specified value to theoffset()field.
-
num
public BGFXInstanceDataBuffer num(int value)
Sets the specified value to thenum()field.
-
stride
public BGFXInstanceDataBuffer stride(short value)
Sets the specified value to thestride()field.
-
handle
public BGFXInstanceDataBuffer handle(short value)
Sets the specified value to thehandle()field.
-
set
public BGFXInstanceDataBuffer set(java.nio.ByteBuffer data, int offset, int num, short stride, short handle)
Initializes this struct with the specified values.
-
set
public BGFXInstanceDataBuffer set(BGFXInstanceDataBuffer src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static BGFXInstanceDataBuffer malloc()
Returns a newBGFXInstanceDataBufferinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static BGFXInstanceDataBuffer calloc()
Returns a newBGFXInstanceDataBufferinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static BGFXInstanceDataBuffer create()
Returns a newBGFXInstanceDataBufferinstance allocated withBufferUtils.
-
create
public static BGFXInstanceDataBuffer create(long address)
Returns a newBGFXInstanceDataBufferinstance for the specified memory address.
-
createSafe
@Nullable public static BGFXInstanceDataBuffer createSafe(long address)
-
malloc
public static BGFXInstanceDataBuffer.Buffer malloc(int capacity)
Returns a newBGFXInstanceDataBuffer.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static BGFXInstanceDataBuffer.Buffer calloc(int capacity)
Returns a newBGFXInstanceDataBuffer.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static BGFXInstanceDataBuffer.Buffer create(int capacity)
Returns a newBGFXInstanceDataBuffer.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static BGFXInstanceDataBuffer.Buffer create(long address, int capacity)
Create aBGFXInstanceDataBuffer.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static BGFXInstanceDataBuffer.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static BGFXInstanceDataBuffer mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXInstanceDataBuffer callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXInstanceDataBuffer mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXInstanceDataBuffer callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXInstanceDataBuffer.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXInstanceDataBuffer.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXInstanceDataBuffer.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 BGFXInstanceDataBuffer.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static BGFXInstanceDataBuffer malloc(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXInstanceDataBufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static BGFXInstanceDataBuffer calloc(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXInstanceDataBufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static BGFXInstanceDataBuffer.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXInstanceDataBuffer.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static BGFXInstanceDataBuffer.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXInstanceDataBuffer.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
ndata
public static java.nio.ByteBuffer ndata(long struct)
Unsafe version ofdata.
-
nsize
public static int nsize(long struct)
Unsafe version ofsize().
-
noffset
public static int noffset(long struct)
Unsafe version ofoffset().
-
nnum
public static int nnum(long struct)
Unsafe version ofnum().
-
nstride
public static short nstride(long struct)
Unsafe version ofstride().
-
nhandle
public static short nhandle(long struct)
Unsafe version ofhandle().
-
ndata
public static void ndata(long struct, java.nio.ByteBuffer value)Unsafe version ofdata.
-
nsize
public static void nsize(long struct, int value)Sets the specified value to thesizefield of the specifiedstruct.
-
noffset
public static void noffset(long struct, int value)Unsafe version ofoffset.
-
nnum
public static void nnum(long struct, int value)Unsafe version ofnum.
-
nstride
public static void nstride(long struct, short value)Unsafe version ofstride.
-
nhandle
public static void nhandle(long struct, short value)Unsafe version ofhandle.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-