public class BGFXInstanceDataBuffer
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
data – pointer to datasize – data sizeoffset – offset in vertex buffernum – number of instancesstride – vertex stridehandle – vertex buffer object handle
struct bgfx_instance_data_buffer_t {
uint8_t * data;
uint32_t size;
uint32_t offset;
uint32_t num;
uint16_t stride;
bgfx_vertex_buffer_handle_t handle;
}| Modifier and Type | Class and Description |
|---|---|
static class |
BGFXInstanceDataBuffer.Buffer
An array of
BGFXInstanceDataBuffer structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DATA
The struct member offsets.
|
static int |
HANDLE
The struct member offsets.
|
static int |
NUM
The struct member offsets.
|
static int |
OFFSET
The struct member offsets.
|
static int |
SIZE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STRIDE
The struct member offsets.
|
| Constructor and Description |
|---|
BGFXInstanceDataBuffer(java.nio.ByteBuffer container)
Creates a
BGFXInstanceDataBuffer instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static BGFXInstanceDataBuffer |
calloc()
Returns a new
BGFXInstanceDataBuffer instance allocated with memCalloc. |
static BGFXInstanceDataBuffer.Buffer |
calloc(int capacity)
Returns a new
BGFXInstanceDataBuffer.Buffer instance allocated with memCalloc. |
static BGFXInstanceDataBuffer |
callocStack()
Returns a new
BGFXInstanceDataBuffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static BGFXInstanceDataBuffer.Buffer |
callocStack(int capacity)
Returns a new
BGFXInstanceDataBuffer.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static BGFXInstanceDataBuffer.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXInstanceDataBuffer.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static BGFXInstanceDataBuffer |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXInstanceDataBuffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static BGFXInstanceDataBuffer |
create()
Returns a new
BGFXInstanceDataBuffer instance allocated with BufferUtils. |
static BGFXInstanceDataBuffer.Buffer |
create(int capacity)
Returns a new
BGFXInstanceDataBuffer.Buffer instance allocated with BufferUtils. |
static BGFXInstanceDataBuffer |
create(long address)
Returns a new
BGFXInstanceDataBuffer instance for the specified memory address. |
static BGFXInstanceDataBuffer.Buffer |
create(long address,
int capacity)
Create a
BGFXInstanceDataBuffer.Buffer instance at the specified memory. |
static BGFXInstanceDataBuffer |
createSafe(long address)
|
static BGFXInstanceDataBuffer.Buffer |
createSafe(long address,
int capacity)
|
java.nio.ByteBuffer |
data()
Returns a
ByteBuffer view of the data pointed to by the data field. |
BGFXInstanceDataBuffer |
data(java.nio.ByteBuffer value)
Sets the address of the specified
ByteBuffer to the data field. |
short |
handle()
Returns the value of the
handle field. |
BGFXInstanceDataBuffer |
handle(short value)
Sets the specified value to the
handle field. |
static BGFXInstanceDataBuffer |
malloc()
Returns a new
BGFXInstanceDataBuffer instance allocated with memAlloc. |
static BGFXInstanceDataBuffer.Buffer |
malloc(int capacity)
Returns a new
BGFXInstanceDataBuffer.Buffer instance allocated with memAlloc. |
static BGFXInstanceDataBuffer |
mallocStack()
Returns a new
BGFXInstanceDataBuffer instance allocated on the thread-local MemoryStack. |
static BGFXInstanceDataBuffer.Buffer |
mallocStack(int capacity)
Returns a new
BGFXInstanceDataBuffer.Buffer instance allocated on the thread-local MemoryStack. |
static BGFXInstanceDataBuffer.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXInstanceDataBuffer.Buffer instance allocated on the specified MemoryStack. |
static BGFXInstanceDataBuffer |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXInstanceDataBuffer instance allocated on the specified MemoryStack. |
static java.nio.ByteBuffer |
ndata(long struct)
Unsafe version of
data. |
static void |
ndata(long struct,
java.nio.ByteBuffer value)
Unsafe version of
data. |
static short |
nhandle(long struct)
Unsafe version of
handle(). |
static void |
nhandle(long struct,
short value)
Unsafe version of
handle. |
static int |
nnum(long struct)
Unsafe version of
num(). |
static void |
nnum(long struct,
int value)
Unsafe version of
num. |
static int |
noffset(long struct)
Unsafe version of
offset(). |
static void |
noffset(long struct,
int value)
Unsafe version of
offset. |
static int |
nsize(long struct)
Unsafe version of
size(). |
static void |
nsize(long struct,
int value)
Sets the specified value to the
size field of the specified struct. |
static short |
nstride(long struct)
Unsafe version of
stride(). |
static void |
nstride(long struct,
short value)
Unsafe version of
stride. |
int |
num()
Returns the value of the
num field. |
BGFXInstanceDataBuffer |
num(int value)
Sets the specified value to the
num field. |
int |
offset()
Returns the value of the
offset field. |
BGFXInstanceDataBuffer |
offset(int value)
Sets the specified value to the
offset field. |
BGFXInstanceDataBuffer |
set(BGFXInstanceDataBuffer src)
Copies the specified struct data to this struct.
|
BGFXInstanceDataBuffer |
set(java.nio.ByteBuffer data,
int offset,
int num,
short stride,
short handle)
Initializes this struct with the specified values.
|
int |
size()
Returns the value of the
size field. |
int |
sizeof() |
short |
stride()
Returns the value of the
stride field. |
BGFXInstanceDataBuffer |
stride(short value)
Sets the specified value to the
stride field. |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int DATA
public static final int SIZE
public static final int OFFSET
public static final int NUM
public static final int STRIDE
public static final int HANDLE
public BGFXInstanceDataBuffer(java.nio.ByteBuffer container)
BGFXInstanceDataBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic java.nio.ByteBuffer data()
ByteBuffer view of the data pointed to by the data field.public int size()
size field.public int offset()
offset field.public int num()
num field.public short stride()
stride field.public short handle()
handle field.public BGFXInstanceDataBuffer data(java.nio.ByteBuffer value)
ByteBuffer to the data field.public BGFXInstanceDataBuffer offset(int value)
offset field.public BGFXInstanceDataBuffer num(int value)
num field.public BGFXInstanceDataBuffer stride(short value)
stride field.public BGFXInstanceDataBuffer handle(short value)
handle field.public BGFXInstanceDataBuffer set(java.nio.ByteBuffer data, int offset, int num, short stride, short handle)
public BGFXInstanceDataBuffer set(BGFXInstanceDataBuffer src)
src - the source structpublic static BGFXInstanceDataBuffer malloc()
BGFXInstanceDataBuffer instance allocated with memAlloc. The instance must be explicitly freed.public static BGFXInstanceDataBuffer calloc()
BGFXInstanceDataBuffer instance allocated with memCalloc. The instance must be explicitly freed.public static BGFXInstanceDataBuffer create()
BGFXInstanceDataBuffer instance allocated with BufferUtils.public static BGFXInstanceDataBuffer create(long address)
BGFXInstanceDataBuffer instance for the specified memory address.@Nullable public static BGFXInstanceDataBuffer createSafe(long address)
public static BGFXInstanceDataBuffer.Buffer malloc(int capacity)
BGFXInstanceDataBuffer.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static BGFXInstanceDataBuffer.Buffer calloc(int capacity)
BGFXInstanceDataBuffer.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static BGFXInstanceDataBuffer.Buffer create(int capacity)
BGFXInstanceDataBuffer.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static BGFXInstanceDataBuffer.Buffer create(long address, int capacity)
BGFXInstanceDataBuffer.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static BGFXInstanceDataBuffer.Buffer createSafe(long address, int capacity)
public static BGFXInstanceDataBuffer mallocStack()
BGFXInstanceDataBuffer instance allocated on the thread-local MemoryStack.public static BGFXInstanceDataBuffer callocStack()
BGFXInstanceDataBuffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static BGFXInstanceDataBuffer mallocStack(org.lwjgl.system.MemoryStack stack)
BGFXInstanceDataBuffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static BGFXInstanceDataBuffer callocStack(org.lwjgl.system.MemoryStack stack)
BGFXInstanceDataBuffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static BGFXInstanceDataBuffer.Buffer mallocStack(int capacity)
BGFXInstanceDataBuffer.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static BGFXInstanceDataBuffer.Buffer callocStack(int capacity)
BGFXInstanceDataBuffer.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static BGFXInstanceDataBuffer.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
BGFXInstanceDataBuffer.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static BGFXInstanceDataBuffer.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
BGFXInstanceDataBuffer.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static java.nio.ByteBuffer ndata(long struct)
data.public static int nsize(long struct)
size().public static int noffset(long struct)
offset().public static int nnum(long struct)
num().public static short nstride(long struct)
stride().public static short nhandle(long struct)
handle().public static void ndata(long struct,
java.nio.ByteBuffer value)
data.public static void nsize(long struct,
int value)
size field of the specified struct.public static void noffset(long struct,
int value)
offset.public static void nnum(long struct,
int value)
num.public static void nstride(long struct,
short value)
stride.public static void nhandle(long struct,
short value)
handle.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.