public class VmaDeviceMemoryCallbacks
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
vkAllocateMemory and vkFreeMemory.
Provided for informative purpose, e.g. to gather statistics about number of allocations or total amount of memory allocated in Vulkan.
Used in VmaAllocatorCreateInfo::pDeviceMemoryCallbacks.
struct VmaDeviceMemoryCallbacks {
PFN_vmaAllocateDeviceMemoryFunction pfnAllocate;
PFN_vmaFreeDeviceMemoryFunction pfnFree;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VmaDeviceMemoryCallbacks.Buffer
An array of
VmaDeviceMemoryCallbacks structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
PFNALLOCATE
The struct member offsets.
|
static int |
PFNFREE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
VmaDeviceMemoryCallbacks(java.nio.ByteBuffer container)
Creates a
VmaDeviceMemoryCallbacks instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VmaDeviceMemoryCallbacks |
calloc()
Returns a new
VmaDeviceMemoryCallbacks instance allocated with memCalloc. |
static VmaDeviceMemoryCallbacks.Buffer |
calloc(int capacity)
Returns a new
VmaDeviceMemoryCallbacks.Buffer instance allocated with memCalloc. |
static VmaDeviceMemoryCallbacks |
callocStack()
Returns a new
VmaDeviceMemoryCallbacks instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VmaDeviceMemoryCallbacks.Buffer |
callocStack(int capacity)
Returns a new
VmaDeviceMemoryCallbacks.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VmaDeviceMemoryCallbacks.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VmaDeviceMemoryCallbacks.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VmaDeviceMemoryCallbacks |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VmaDeviceMemoryCallbacks instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VmaDeviceMemoryCallbacks |
create()
Returns a new
VmaDeviceMemoryCallbacks instance allocated with BufferUtils. |
static VmaDeviceMemoryCallbacks.Buffer |
create(int capacity)
Returns a new
VmaDeviceMemoryCallbacks.Buffer instance allocated with BufferUtils. |
static VmaDeviceMemoryCallbacks |
create(long address)
Returns a new
VmaDeviceMemoryCallbacks instance for the specified memory address. |
static VmaDeviceMemoryCallbacks.Buffer |
create(long address,
int capacity)
Create a
VmaDeviceMemoryCallbacks.Buffer instance at the specified memory. |
static VmaDeviceMemoryCallbacks |
createSafe(long address)
|
static VmaDeviceMemoryCallbacks.Buffer |
createSafe(long address,
int capacity)
|
static VmaDeviceMemoryCallbacks |
malloc()
Returns a new
VmaDeviceMemoryCallbacks instance allocated with memAlloc. |
static VmaDeviceMemoryCallbacks.Buffer |
malloc(int capacity)
Returns a new
VmaDeviceMemoryCallbacks.Buffer instance allocated with memAlloc. |
static VmaDeviceMemoryCallbacks |
mallocStack()
Returns a new
VmaDeviceMemoryCallbacks instance allocated on the thread-local MemoryStack. |
static VmaDeviceMemoryCallbacks.Buffer |
mallocStack(int capacity)
Returns a new
VmaDeviceMemoryCallbacks.Buffer instance allocated on the thread-local MemoryStack. |
static VmaDeviceMemoryCallbacks.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VmaDeviceMemoryCallbacks.Buffer instance allocated on the specified MemoryStack. |
static VmaDeviceMemoryCallbacks |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VmaDeviceMemoryCallbacks instance allocated on the specified MemoryStack. |
static VmaAllocateDeviceMemoryFunction |
npfnAllocate(long struct)
Unsafe version of
pfnAllocate(). |
static void |
npfnAllocate(long struct,
VmaAllocateDeviceMemoryFunctionI value)
Unsafe version of
pfnAllocate. |
static VmaFreeDeviceMemoryFunction |
npfnFree(long struct)
Unsafe version of
pfnFree(). |
static void |
npfnFree(long struct,
VmaFreeDeviceMemoryFunctionI value)
Unsafe version of
pfnFree. |
VmaAllocateDeviceMemoryFunction |
pfnAllocate()
Returns the value of the
pfnAllocate field. |
VmaDeviceMemoryCallbacks |
pfnAllocate(VmaAllocateDeviceMemoryFunctionI value)
Sets the specified value to the
pfnAllocate field. |
VmaFreeDeviceMemoryFunction |
pfnFree()
Returns the value of the
pfnFree field. |
VmaDeviceMemoryCallbacks |
pfnFree(VmaFreeDeviceMemoryFunctionI value)
Sets the specified value to the
pfnFree field. |
VmaDeviceMemoryCallbacks |
set(VmaAllocateDeviceMemoryFunctionI pfnAllocate,
VmaFreeDeviceMemoryFunctionI pfnFree)
Initializes this struct with the specified values.
|
VmaDeviceMemoryCallbacks |
set(VmaDeviceMemoryCallbacks src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int PFNALLOCATE
public static final int PFNFREE
public VmaDeviceMemoryCallbacks(java.nio.ByteBuffer container)
VmaDeviceMemoryCallbacks 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.Struct@Nullable public VmaAllocateDeviceMemoryFunction pfnAllocate()
pfnAllocate field.@Nullable public VmaFreeDeviceMemoryFunction pfnFree()
pfnFree field.public VmaDeviceMemoryCallbacks pfnAllocate(@Nullable VmaAllocateDeviceMemoryFunctionI value)
pfnAllocate field.public VmaDeviceMemoryCallbacks pfnFree(@Nullable VmaFreeDeviceMemoryFunctionI value)
pfnFree field.public VmaDeviceMemoryCallbacks set(VmaAllocateDeviceMemoryFunctionI pfnAllocate, VmaFreeDeviceMemoryFunctionI pfnFree)
public VmaDeviceMemoryCallbacks set(VmaDeviceMemoryCallbacks src)
src - the source structpublic static VmaDeviceMemoryCallbacks malloc()
VmaDeviceMemoryCallbacks instance allocated with memAlloc. The instance must be explicitly freed.public static VmaDeviceMemoryCallbacks calloc()
VmaDeviceMemoryCallbacks instance allocated with memCalloc. The instance must be explicitly freed.public static VmaDeviceMemoryCallbacks create()
VmaDeviceMemoryCallbacks instance allocated with BufferUtils.public static VmaDeviceMemoryCallbacks create(long address)
VmaDeviceMemoryCallbacks instance for the specified memory address.@Nullable public static VmaDeviceMemoryCallbacks createSafe(long address)
public static VmaDeviceMemoryCallbacks.Buffer malloc(int capacity)
VmaDeviceMemoryCallbacks.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VmaDeviceMemoryCallbacks.Buffer calloc(int capacity)
VmaDeviceMemoryCallbacks.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VmaDeviceMemoryCallbacks.Buffer create(int capacity)
VmaDeviceMemoryCallbacks.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VmaDeviceMemoryCallbacks.Buffer create(long address, int capacity)
VmaDeviceMemoryCallbacks.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VmaDeviceMemoryCallbacks.Buffer createSafe(long address, int capacity)
public static VmaDeviceMemoryCallbacks mallocStack()
VmaDeviceMemoryCallbacks instance allocated on the thread-local MemoryStack.public static VmaDeviceMemoryCallbacks callocStack()
VmaDeviceMemoryCallbacks instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VmaDeviceMemoryCallbacks mallocStack(org.lwjgl.system.MemoryStack stack)
VmaDeviceMemoryCallbacks instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VmaDeviceMemoryCallbacks callocStack(org.lwjgl.system.MemoryStack stack)
VmaDeviceMemoryCallbacks instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VmaDeviceMemoryCallbacks.Buffer mallocStack(int capacity)
VmaDeviceMemoryCallbacks.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VmaDeviceMemoryCallbacks.Buffer callocStack(int capacity)
VmaDeviceMemoryCallbacks.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VmaDeviceMemoryCallbacks.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VmaDeviceMemoryCallbacks.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VmaDeviceMemoryCallbacks.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VmaDeviceMemoryCallbacks.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacity@Nullable public static VmaAllocateDeviceMemoryFunction npfnAllocate(long struct)
pfnAllocate().@Nullable public static VmaFreeDeviceMemoryFunction npfnFree(long struct)
pfnFree().public static void npfnAllocate(long struct,
@Nullable
VmaAllocateDeviceMemoryFunctionI value)
pfnAllocate.public static void npfnFree(long struct,
@Nullable
VmaFreeDeviceMemoryFunctionI value)
pfnFree.Copyright LWJGL. All Rights Reserved. License terms.