Package org.lwjgl.vulkan
Class VkMappedMemoryRange
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkMappedMemoryRange
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkMappedMemoryRange extends Struct
Khronos Reference Page
Vulkan SpecificationDescribes a memory range.
Valid Usage
sTypemust beSTRUCTURE_TYPE_MAPPED_MEMORY_RANGEpNextmust beNULLmemorymust be a validVkDeviceMemoryhandlememorymust currently be mapped- If
sizeis not equal toWHOLE_SIZE,offsetandsizemust specify a range contained within the currently mapped range ofmemory - If
sizeis equal toWHOLE_SIZE,offsetmust be within the currently mapped range ofmemory offsetmust be a multiple ofVkPhysicalDeviceLimits::nonCoherentAtomSize- If
sizeis not equal toWHOLE_SIZE,sizemust be a multiple ofVkPhysicalDeviceLimits::nonCoherentAtomSize
Member documentation
sType– the type of this structure. Must be:STRUCTURE_TYPE_MAPPED_MEMORY_RANGEpNext– reserved for use by extensionsmemory– the memory object to which this range belongsoffset– the zero-based byte offset from the beginning of the memory objectsize– either the size of range, orWHOLE_SIZEto affect the range from offset to the end of the current mapping of the allocation
Layout
struct VkMappedMemoryRange { VkStructureType sType; const void * pNext; VkDeviceMemory memory; VkDeviceSize offset; VkDeviceSize size; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkMappedMemoryRange.BufferAn array ofVkMappedMemoryRangestructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description VkMappedMemoryRange(java.nio.ByteBuffer container)Creates aVkMappedMemoryRangeinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkMappedMemoryRangecalloc()Returns a newVkMappedMemoryRangeinstance allocated withmemCalloc.static VkMappedMemoryRange.Buffercalloc(int capacity)Returns a newVkMappedMemoryRange.Bufferinstance allocated withmemCalloc.static VkMappedMemoryRangecallocStack()Returns a newVkMappedMemoryRangeinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkMappedMemoryRange.BuffercallocStack(int capacity)Returns a newVkMappedMemoryRange.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkMappedMemoryRange.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkMappedMemoryRange.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMappedMemoryRangecallocStack(MemoryStack stack)Returns a newVkMappedMemoryRangeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMappedMemoryRangecreate()Returns a newVkMappedMemoryRangeinstance allocated withBufferUtils.static VkMappedMemoryRange.Buffercreate(int capacity)Returns a newVkMappedMemoryRange.Bufferinstance allocated withBufferUtils.static VkMappedMemoryRangecreate(long address)Returns a newVkMappedMemoryRangeinstance for the specified memory address ornullif the address isNULL.static VkMappedMemoryRange.Buffercreate(long address, int capacity)Create aVkMappedMemoryRange.Bufferinstance at the specified memory.static VkMappedMemoryRangemalloc()Returns a newVkMappedMemoryRangeinstance allocated withmemAlloc.static VkMappedMemoryRange.Buffermalloc(int capacity)Returns a newVkMappedMemoryRange.Bufferinstance allocated withmemAlloc.static VkMappedMemoryRangemallocStack()Returns a newVkMappedMemoryRangeinstance allocated on the thread-localMemoryStack.static VkMappedMemoryRange.BuffermallocStack(int capacity)Returns a newVkMappedMemoryRange.Bufferinstance allocated on the thread-localMemoryStack.static VkMappedMemoryRange.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkMappedMemoryRange.Bufferinstance allocated on the specifiedMemoryStack.static VkMappedMemoryRangemallocStack(MemoryStack stack)Returns a newVkMappedMemoryRangeinstance allocated on the specifiedMemoryStack.longmemory()Returns the value of thememoryfield.VkMappedMemoryRangememory(long value)Sets the specified value to thememoryfield.VkMappedMemoryRangenset(long struct)Unsafe version ofset.longoffset()Returns the value of theoffsetfield.VkMappedMemoryRangeoffset(long value)Sets the specified value to theoffsetfield.longpNext()Returns the value of thepNextfield.VkMappedMemoryRangepNext(long value)Sets the specified value to thepNextfield.VkMappedMemoryRangeset(int sType, long pNext, long memory, long offset, long size)Initializes this struct with the specified values.VkMappedMemoryRangeset(VkMappedMemoryRange src)Copies the specified struct data to this struct.longsize()Returns the value of thesizefield.VkMappedMemoryRangesize(long value)Sets the specified value to thesizefield.intsizeof()Returns thesizeof(struct).intsType()Returns the value of thesTypefield.VkMappedMemoryRangesType(int value)Sets the specified value to thesTypefield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkMappedMemoryRange
public VkMappedMemoryRange(java.nio.ByteBuffer container)
Creates aVkMappedMemoryRangeinstance 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()
Description copied from class:StructReturns thesizeof(struct).
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
memory
public long memory()
Returns the value of thememoryfield.
-
offset
public long offset()
Returns the value of theoffsetfield.
-
size
public long size()
Returns the value of thesizefield.
-
sType
public VkMappedMemoryRange sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkMappedMemoryRange pNext(long value)
Sets the specified value to thepNextfield.
-
memory
public VkMappedMemoryRange memory(long value)
Sets the specified value to thememoryfield.
-
offset
public VkMappedMemoryRange offset(long value)
Sets the specified value to theoffsetfield.
-
size
public VkMappedMemoryRange size(long value)
Sets the specified value to thesizefield.
-
set
public VkMappedMemoryRange set(int sType, long pNext, long memory, long offset, long size)
Initializes this struct with the specified values.
-
nset
public VkMappedMemoryRange nset(long struct)
Unsafe version ofset.
-
set
public VkMappedMemoryRange set(VkMappedMemoryRange src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkMappedMemoryRange malloc()
Returns a newVkMappedMemoryRangeinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkMappedMemoryRange calloc()
Returns a newVkMappedMemoryRangeinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkMappedMemoryRange create()
Returns a newVkMappedMemoryRangeinstance allocated withBufferUtils.
-
create
public static VkMappedMemoryRange create(long address)
Returns a newVkMappedMemoryRangeinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkMappedMemoryRange.Buffer malloc(int capacity)
Returns a newVkMappedMemoryRange.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkMappedMemoryRange.Buffer calloc(int capacity)
Returns a newVkMappedMemoryRange.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkMappedMemoryRange.Buffer create(int capacity)
Returns a newVkMappedMemoryRange.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkMappedMemoryRange.Buffer create(long address, int capacity)
Create aVkMappedMemoryRange.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkMappedMemoryRange mallocStack()
Returns a newVkMappedMemoryRangeinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkMappedMemoryRange callocStack()
Returns a newVkMappedMemoryRangeinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkMappedMemoryRange mallocStack(MemoryStack stack)
Returns a newVkMappedMemoryRangeinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkMappedMemoryRange callocStack(MemoryStack stack)
Returns a newVkMappedMemoryRangeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkMappedMemoryRange.Buffer mallocStack(int capacity)
Returns a newVkMappedMemoryRange.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkMappedMemoryRange.Buffer callocStack(int capacity)
Returns a newVkMappedMemoryRange.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkMappedMemoryRange.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkMappedMemoryRange.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkMappedMemoryRange.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkMappedMemoryRange.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-