Package org.lwjgl.util.vma
Class VmaRecordSettings
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.vma.VmaRecordSettings
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VmaRecordSettings extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Parameters for recording calls to VMA functions. To be used inVmaAllocatorCreateInfo
::pRecordSettings
.Member documentation
flags
– flags for recording. Must be:RECORD_FLUSH_AFTER_CALL_BIT
pFilePath
– path to the file that should be written by the recording.Suggested extension: "csv". If the file already exists, it will be overwritten. It will be opened for the whole time
VmaAllocator
object is alive. If opening this file fails, creation of the whole allocator object fails.
Layout
struct VmaRecordSettings { VmaRecordFlags flags; char const * pFilePath; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VmaRecordSettings.Buffer
An array ofVmaRecordSettings
structs.
-
Constructor Summary
Constructors Constructor Description VmaRecordSettings(java.nio.ByteBuffer container)
Creates aVmaRecordSettings
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VmaRecordSettings
calloc()
Returns a newVmaRecordSettings
instance allocated withmemCalloc
.static VmaRecordSettings.Buffer
calloc(int capacity)
Returns a newVmaRecordSettings.Buffer
instance allocated withmemCalloc
.static VmaRecordSettings
callocStack()
Returns a newVmaRecordSettings
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VmaRecordSettings.Buffer
callocStack(int capacity)
Returns a newVmaRecordSettings.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VmaRecordSettings.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaRecordSettings.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VmaRecordSettings
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaRecordSettings
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VmaRecordSettings
create()
Returns a newVmaRecordSettings
instance allocated withBufferUtils
.static VmaRecordSettings.Buffer
create(int capacity)
Returns a newVmaRecordSettings.Buffer
instance allocated withBufferUtils
.static VmaRecordSettings
create(long address)
Returns a newVmaRecordSettings
instance for the specified memory address.static VmaRecordSettings.Buffer
create(long address, int capacity)
Create aVmaRecordSettings.Buffer
instance at the specified memory.static VmaRecordSettings
createSafe(long address)
static VmaRecordSettings.Buffer
createSafe(long address, int capacity)
int
flags()
Returns the value of theflags
field.VmaRecordSettings
flags(int value)
Sets the specified value to theflags
field.static VmaRecordSettings
malloc()
Returns a newVmaRecordSettings
instance allocated withmemAlloc
.static VmaRecordSettings.Buffer
malloc(int capacity)
Returns a newVmaRecordSettings.Buffer
instance allocated withmemAlloc
.static VmaRecordSettings
mallocStack()
Returns a newVmaRecordSettings
instance allocated on the thread-localMemoryStack
.static VmaRecordSettings.Buffer
mallocStack(int capacity)
Returns a newVmaRecordSettings.Buffer
instance allocated on the thread-localMemoryStack
.static VmaRecordSettings.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaRecordSettings.Buffer
instance allocated on the specifiedMemoryStack
.static VmaRecordSettings
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaRecordSettings
instance allocated on the specifiedMemoryStack
.static int
nflags(long struct)
Unsafe version offlags()
.static void
nflags(long struct, int value)
Unsafe version offlags
.static java.nio.ByteBuffer
npFilePath(long struct)
Unsafe version ofpFilePath()
.static void
npFilePath(long struct, java.nio.ByteBuffer value)
Unsafe version ofpFilePath
.static java.lang.String
npFilePathString(long struct)
Unsafe version ofpFilePathString()
.java.nio.ByteBuffer
pFilePath()
Returns aByteBuffer
view of the null-terminated string pointed to by thepFilePath
field.VmaRecordSettings
pFilePath(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thepFilePath
field.java.lang.String
pFilePathString()
Decodes the null-terminated string pointed to by thepFilePath
field.VmaRecordSettings
set(int flags, java.nio.ByteBuffer pFilePath)
Initializes this struct with the specified values.VmaRecordSettings
set(VmaRecordSettings src)
Copies the specified struct data to this struct.int
sizeof()
static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
VmaRecordSettings
public VmaRecordSettings(java.nio.ByteBuffer container)
Creates aVmaRecordSettings
instance at the current position of the specifiedByteBuffer
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.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
flags
public int flags()
Returns the value of theflags
field.
-
pFilePath
public java.nio.ByteBuffer pFilePath()
Returns aByteBuffer
view of the null-terminated string pointed to by thepFilePath
field.
-
pFilePathString
public java.lang.String pFilePathString()
Decodes the null-terminated string pointed to by thepFilePath
field.
-
flags
public VmaRecordSettings flags(int value)
Sets the specified value to theflags
field.
-
pFilePath
public VmaRecordSettings pFilePath(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thepFilePath
field.
-
set
public VmaRecordSettings set(int flags, java.nio.ByteBuffer pFilePath)
Initializes this struct with the specified values.
-
set
public VmaRecordSettings set(VmaRecordSettings src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VmaRecordSettings malloc()
Returns a newVmaRecordSettings
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VmaRecordSettings calloc()
Returns a newVmaRecordSettings
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VmaRecordSettings create()
Returns a newVmaRecordSettings
instance allocated withBufferUtils
.
-
create
public static VmaRecordSettings create(long address)
Returns a newVmaRecordSettings
instance for the specified memory address.
-
createSafe
@Nullable public static VmaRecordSettings createSafe(long address)
-
malloc
public static VmaRecordSettings.Buffer malloc(int capacity)
Returns a newVmaRecordSettings.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VmaRecordSettings.Buffer calloc(int capacity)
Returns a newVmaRecordSettings.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VmaRecordSettings.Buffer create(int capacity)
Returns a newVmaRecordSettings.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VmaRecordSettings.Buffer create(long address, int capacity)
Create aVmaRecordSettings.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VmaRecordSettings.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VmaRecordSettings mallocStack()
Returns a newVmaRecordSettings
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VmaRecordSettings callocStack()
Returns a newVmaRecordSettings
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VmaRecordSettings mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaRecordSettings
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VmaRecordSettings callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaRecordSettings
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VmaRecordSettings.Buffer mallocStack(int capacity)
Returns a newVmaRecordSettings.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VmaRecordSettings.Buffer callocStack(int capacity)
Returns a newVmaRecordSettings.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VmaRecordSettings.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaRecordSettings.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VmaRecordSettings.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaRecordSettings.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nflags
public static int nflags(long struct)
Unsafe version offlags()
.
-
npFilePath
public static java.nio.ByteBuffer npFilePath(long struct)
Unsafe version ofpFilePath()
.
-
npFilePathString
public static java.lang.String npFilePathString(long struct)
Unsafe version ofpFilePathString()
.
-
nflags
public static void nflags(long struct, int value)
Unsafe version offlags
.
-
npFilePath
public static void npFilePath(long struct, java.nio.ByteBuffer value)
Unsafe version ofpFilePath
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-