public class BGFXMemory
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
| Modifier and Type | Class and Description |
|---|---|
static class |
BGFXMemory.Buffer
An array of
BGFXMemory structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DATA
The struct member offsets.
|
static int |
SIZE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
BGFXMemory(java.nio.ByteBuffer container)
Creates a
BGFXMemory instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static BGFXMemory |
calloc()
Returns a new
BGFXMemory instance allocated with memCalloc. |
static BGFXMemory.Buffer |
calloc(int capacity)
Returns a new
BGFXMemory.Buffer instance allocated with memCalloc. |
static BGFXMemory |
callocStack()
Returns a new
BGFXMemory instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static BGFXMemory.Buffer |
callocStack(int capacity)
Returns a new
BGFXMemory.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static BGFXMemory.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXMemory.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static BGFXMemory |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXMemory instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static BGFXMemory |
create()
Returns a new
BGFXMemory instance allocated with BufferUtils. |
static BGFXMemory.Buffer |
create(int capacity)
Returns a new
BGFXMemory.Buffer instance allocated with BufferUtils. |
static BGFXMemory |
create(long address)
Returns a new
BGFXMemory instance for the specified memory address. |
static BGFXMemory.Buffer |
create(long address,
int capacity)
Create a
BGFXMemory.Buffer instance at the specified memory. |
static BGFXMemory |
createSafe(long address)
|
static BGFXMemory.Buffer |
createSafe(long address,
int capacity)
|
java.nio.ByteBuffer |
data()
Returns a
ByteBuffer view of the data pointed to by the data field. |
BGFXMemory |
data(java.nio.ByteBuffer value)
Sets the address of the specified
ByteBuffer to the data field. |
static BGFXMemory |
malloc()
Returns a new
BGFXMemory instance allocated with memAlloc. |
static BGFXMemory.Buffer |
malloc(int capacity)
Returns a new
BGFXMemory.Buffer instance allocated with memAlloc. |
static BGFXMemory |
mallocStack()
Returns a new
BGFXMemory instance allocated on the thread-local MemoryStack. |
static BGFXMemory.Buffer |
mallocStack(int capacity)
Returns a new
BGFXMemory.Buffer instance allocated on the thread-local MemoryStack. |
static BGFXMemory.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXMemory.Buffer instance allocated on the specified MemoryStack. |
static BGFXMemory |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXMemory 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 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. |
BGFXMemory |
set(BGFXMemory src)
Copies the specified struct data to this struct.
|
int |
size()
Returns the value of the
size field. |
int |
sizeof() |
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 BGFXMemory(java.nio.ByteBuffer container)
BGFXMemory 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 BGFXMemory data(java.nio.ByteBuffer value)
ByteBuffer to the data field.public BGFXMemory set(BGFXMemory src)
src - the source structpublic static BGFXMemory malloc()
BGFXMemory instance allocated with memAlloc. The instance must be explicitly freed.public static BGFXMemory calloc()
BGFXMemory instance allocated with memCalloc. The instance must be explicitly freed.public static BGFXMemory create()
BGFXMemory instance allocated with BufferUtils.public static BGFXMemory create(long address)
BGFXMemory instance for the specified memory address.@Nullable public static BGFXMemory createSafe(long address)
public static BGFXMemory.Buffer malloc(int capacity)
BGFXMemory.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static BGFXMemory.Buffer calloc(int capacity)
BGFXMemory.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static BGFXMemory.Buffer create(int capacity)
BGFXMemory.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static BGFXMemory.Buffer create(long address, int capacity)
BGFXMemory.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static BGFXMemory.Buffer createSafe(long address, int capacity)
public static BGFXMemory mallocStack()
BGFXMemory instance allocated on the thread-local MemoryStack.public static BGFXMemory callocStack()
BGFXMemory instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static BGFXMemory mallocStack(org.lwjgl.system.MemoryStack stack)
BGFXMemory instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static BGFXMemory callocStack(org.lwjgl.system.MemoryStack stack)
BGFXMemory instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static BGFXMemory.Buffer mallocStack(int capacity)
BGFXMemory.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static BGFXMemory.Buffer callocStack(int capacity)
BGFXMemory.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static BGFXMemory.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
BGFXMemory.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static BGFXMemory.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
BGFXMemory.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 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 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.