Package org.lwjgl.util.vma
Class VmaDeviceMemoryCallbacks
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.vma.VmaDeviceMemoryCallbacks
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VmaDeviceMemoryCallbacks extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceSet of callbacks that the library will call forvkAllocateMemoryandvkFreeMemory.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.Layout
struct VmaDeviceMemoryCallbacks {PFN_vmaAllocateDeviceMemoryFunctionpfnAllocate;PFN_vmaFreeDeviceMemoryFunctionpfnFree; void * pUserData; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVmaDeviceMemoryCallbacks.BufferAn array ofVmaDeviceMemoryCallbacksstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intPFNALLOCATE
PFNFREE
PUSERDATAThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VmaDeviceMemoryCallbacks(java.nio.ByteBuffer container)Creates aVmaDeviceMemoryCallbacksinstance 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 VmaDeviceMemoryCallbackscalloc()Returns a newVmaDeviceMemoryCallbacksinstance allocated withmemCalloc.static VmaDeviceMemoryCallbacks.Buffercalloc(int capacity)Returns a newVmaDeviceMemoryCallbacks.Bufferinstance allocated withmemCalloc.static VmaDeviceMemoryCallbacks.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVmaDeviceMemoryCallbacks.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VmaDeviceMemoryCallbackscalloc(org.lwjgl.system.MemoryStack stack)Returns a newVmaDeviceMemoryCallbacksinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VmaDeviceMemoryCallbackscallocStack()Deprecated.static VmaDeviceMemoryCallbacks.BuffercallocStack(int capacity)Deprecated.static VmaDeviceMemoryCallbacks.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VmaDeviceMemoryCallbackscallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VmaDeviceMemoryCallbackscreate()Returns a newVmaDeviceMemoryCallbacksinstance allocated withBufferUtils.static VmaDeviceMemoryCallbacks.Buffercreate(int capacity)Returns a newVmaDeviceMemoryCallbacks.Bufferinstance allocated withBufferUtils.static VmaDeviceMemoryCallbackscreate(long address)Returns a newVmaDeviceMemoryCallbacksinstance for the specified memory address.static VmaDeviceMemoryCallbacks.Buffercreate(long address, int capacity)Create aVmaDeviceMemoryCallbacks.Bufferinstance at the specified memory.static VmaDeviceMemoryCallbackscreateSafe(long address)static VmaDeviceMemoryCallbacks.BuffercreateSafe(long address, int capacity)static VmaDeviceMemoryCallbacksmalloc()Returns a newVmaDeviceMemoryCallbacksinstance allocated withmemAlloc.static VmaDeviceMemoryCallbacks.Buffermalloc(int capacity)Returns a newVmaDeviceMemoryCallbacks.Bufferinstance allocated withmemAlloc.static VmaDeviceMemoryCallbacks.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVmaDeviceMemoryCallbacks.Bufferinstance allocated on the specifiedMemoryStack.static VmaDeviceMemoryCallbacksmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVmaDeviceMemoryCallbacksinstance allocated on the specifiedMemoryStack.static VmaDeviceMemoryCallbacksmallocStack()Deprecated.static VmaDeviceMemoryCallbacks.BuffermallocStack(int capacity)Deprecated.static VmaDeviceMemoryCallbacks.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VmaDeviceMemoryCallbacksmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VmaAllocateDeviceMemoryFunctionnpfnAllocate(long struct)Unsafe version ofpfnAllocate().static voidnpfnAllocate(long struct, VmaAllocateDeviceMemoryFunctionI value)Unsafe version ofpfnAllocate.static VmaFreeDeviceMemoryFunctionnpfnFree(long struct)Unsafe version ofpfnFree().static voidnpfnFree(long struct, VmaFreeDeviceMemoryFunctionI value)Unsafe version ofpfnFree.static longnpUserData(long struct)Unsafe version ofpUserData().static voidnpUserData(long struct, long value)Unsafe version ofpUserData.VmaAllocateDeviceMemoryFunctionpfnAllocate()VmaDeviceMemoryCallbackspfnAllocate(VmaAllocateDeviceMemoryFunctionI value)Sets the specified value to thepfnAllocatefield.VmaFreeDeviceMemoryFunctionpfnFree()VmaDeviceMemoryCallbackspfnFree(VmaFreeDeviceMemoryFunctionI value)Sets the specified value to thepfnFreefield.longpUserData()VmaDeviceMemoryCallbackspUserData(long value)Sets the specified value to thepUserDatafield.VmaDeviceMemoryCallbacksset(VmaAllocateDeviceMemoryFunctionI pfnAllocate, VmaFreeDeviceMemoryFunctionI pfnFree, long pUserData)Initializes this struct with the specified values.VmaDeviceMemoryCallbacksset(VmaDeviceMemoryCallbacks src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
VmaDeviceMemoryCallbacks
public VmaDeviceMemoryCallbacks(java.nio.ByteBuffer container)
Creates aVmaDeviceMemoryCallbacksinstance 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
-
pfnAllocate
@Nullable public VmaAllocateDeviceMemoryFunction pfnAllocate()
- Returns:
- the value of the
pfnAllocatefield.
-
pfnFree
@Nullable public VmaFreeDeviceMemoryFunction pfnFree()
- Returns:
- the value of the
pfnFreefield.
-
pUserData
public long pUserData()
- Returns:
- the value of the
pUserDatafield.
-
pfnAllocate
public VmaDeviceMemoryCallbacks pfnAllocate(@Nullable VmaAllocateDeviceMemoryFunctionI value)
Sets the specified value to thepfnAllocatefield.
-
pfnFree
public VmaDeviceMemoryCallbacks pfnFree(@Nullable VmaFreeDeviceMemoryFunctionI value)
Sets the specified value to thepfnFreefield.
-
pUserData
public VmaDeviceMemoryCallbacks pUserData(long value)
Sets the specified value to thepUserDatafield.
-
set
public VmaDeviceMemoryCallbacks set(VmaAllocateDeviceMemoryFunctionI pfnAllocate, VmaFreeDeviceMemoryFunctionI pfnFree, long pUserData)
Initializes this struct with the specified values.
-
set
public VmaDeviceMemoryCallbacks set(VmaDeviceMemoryCallbacks src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VmaDeviceMemoryCallbacks malloc()
Returns a newVmaDeviceMemoryCallbacksinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VmaDeviceMemoryCallbacks calloc()
Returns a newVmaDeviceMemoryCallbacksinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VmaDeviceMemoryCallbacks create()
Returns a newVmaDeviceMemoryCallbacksinstance allocated withBufferUtils.
-
create
public static VmaDeviceMemoryCallbacks create(long address)
Returns a newVmaDeviceMemoryCallbacksinstance for the specified memory address.
-
createSafe
@Nullable public static VmaDeviceMemoryCallbacks createSafe(long address)
-
malloc
public static VmaDeviceMemoryCallbacks.Buffer malloc(int capacity)
Returns a newVmaDeviceMemoryCallbacks.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VmaDeviceMemoryCallbacks.Buffer calloc(int capacity)
Returns a newVmaDeviceMemoryCallbacks.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VmaDeviceMemoryCallbacks.Buffer create(int capacity)
Returns a newVmaDeviceMemoryCallbacks.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VmaDeviceMemoryCallbacks.Buffer create(long address, int capacity)
Create aVmaDeviceMemoryCallbacks.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VmaDeviceMemoryCallbacks.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VmaDeviceMemoryCallbacks mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VmaDeviceMemoryCallbacks callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VmaDeviceMemoryCallbacks mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VmaDeviceMemoryCallbacks callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VmaDeviceMemoryCallbacks.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VmaDeviceMemoryCallbacks.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VmaDeviceMemoryCallbacks.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 VmaDeviceMemoryCallbacks.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VmaDeviceMemoryCallbacks malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVmaDeviceMemoryCallbacksinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VmaDeviceMemoryCallbacks calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVmaDeviceMemoryCallbacksinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VmaDeviceMemoryCallbacks.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaDeviceMemoryCallbacks.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VmaDeviceMemoryCallbacks.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaDeviceMemoryCallbacks.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
npfnAllocate
@Nullable public static VmaAllocateDeviceMemoryFunction npfnAllocate(long struct)
Unsafe version ofpfnAllocate().
-
npfnFree
@Nullable public static VmaFreeDeviceMemoryFunction npfnFree(long struct)
Unsafe version ofpfnFree().
-
npUserData
public static long npUserData(long struct)
Unsafe version ofpUserData().
-
npfnAllocate
public static void npfnAllocate(long struct, @Nullable VmaAllocateDeviceMemoryFunctionI value)Unsafe version ofpfnAllocate.
-
npfnFree
public static void npfnFree(long struct, @Nullable VmaFreeDeviceMemoryFunctionI value)Unsafe version ofpfnFree.
-
npUserData
public static void npUserData(long struct, long value)Unsafe version ofpUserData.
-
-