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
sType
must beSTRUCTURE_TYPE_MAPPED_MEMORY_RANGE
pNext
must beNULL
memory
must be a validVkDeviceMemory
handlememory
must currently be mapped- If
size
is not equal toWHOLE_SIZE
,offset
andsize
must specify a range contained within the currently mapped range ofmemory
- If
size
is equal toWHOLE_SIZE
,offset
must be within the currently mapped range ofmemory
offset
must be a multiple ofVkPhysicalDeviceLimits
::nonCoherentAtomSize
- If
size
is not equal toWHOLE_SIZE
,size
must be a multiple ofVkPhysicalDeviceLimits
::nonCoherentAtomSize
Member documentation
sType
– the type of this structure. Must be:STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
pNext
– 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_SIZE
to 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 class
VkMappedMemoryRange.Buffer
An array ofVkMappedMemoryRange
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The 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 aVkMappedMemoryRange
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkMappedMemoryRange
calloc()
Returns a newVkMappedMemoryRange
instance allocated withmemCalloc
.static VkMappedMemoryRange.Buffer
calloc(int capacity)
Returns a newVkMappedMemoryRange.Buffer
instance allocated withmemCalloc
.static VkMappedMemoryRange
callocStack()
Returns a newVkMappedMemoryRange
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkMappedMemoryRange.Buffer
callocStack(int capacity)
Returns a newVkMappedMemoryRange.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkMappedMemoryRange.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkMappedMemoryRange.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkMappedMemoryRange
callocStack(MemoryStack stack)
Returns a newVkMappedMemoryRange
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkMappedMemoryRange
create()
Returns a newVkMappedMemoryRange
instance allocated withBufferUtils
.static VkMappedMemoryRange.Buffer
create(int capacity)
Returns a newVkMappedMemoryRange.Buffer
instance allocated withBufferUtils
.static VkMappedMemoryRange
create(long address)
Returns a newVkMappedMemoryRange
instance for the specified memory address ornull
if the address isNULL
.static VkMappedMemoryRange.Buffer
create(long address, int capacity)
Create aVkMappedMemoryRange.Buffer
instance at the specified memory.static VkMappedMemoryRange
malloc()
Returns a newVkMappedMemoryRange
instance allocated withmemAlloc
.static VkMappedMemoryRange.Buffer
malloc(int capacity)
Returns a newVkMappedMemoryRange.Buffer
instance allocated withmemAlloc
.static VkMappedMemoryRange
mallocStack()
Returns a newVkMappedMemoryRange
instance allocated on the thread-localMemoryStack
.static VkMappedMemoryRange.Buffer
mallocStack(int capacity)
Returns a newVkMappedMemoryRange.Buffer
instance allocated on the thread-localMemoryStack
.static VkMappedMemoryRange.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkMappedMemoryRange.Buffer
instance allocated on the specifiedMemoryStack
.static VkMappedMemoryRange
mallocStack(MemoryStack stack)
Returns a newVkMappedMemoryRange
instance allocated on the specifiedMemoryStack
.long
memory()
Returns the value of thememory
field.VkMappedMemoryRange
memory(long value)
Sets the specified value to thememory
field.VkMappedMemoryRange
nset(long struct)
Unsafe version ofset
.long
offset()
Returns the value of theoffset
field.VkMappedMemoryRange
offset(long value)
Sets the specified value to theoffset
field.long
pNext()
Returns the value of thepNext
field.VkMappedMemoryRange
pNext(long value)
Sets the specified value to thepNext
field.VkMappedMemoryRange
set(int sType, long pNext, long memory, long offset, long size)
Initializes this struct with the specified values.VkMappedMemoryRange
set(VkMappedMemoryRange src)
Copies the specified struct data to this struct.long
size()
Returns the value of thesize
field.VkMappedMemoryRange
size(long value)
Sets the specified value to thesize
field.int
sizeof()
Returns thesizeof(struct)
.int
sType()
Returns the value of thesType
field.VkMappedMemoryRange
sType(int value)
Sets the specified value to thesType
field.-
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 aVkMappedMemoryRange
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()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
memory
public long memory()
Returns the value of thememory
field.
-
offset
public long offset()
Returns the value of theoffset
field.
-
size
public long size()
Returns the value of thesize
field.
-
sType
public VkMappedMemoryRange sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkMappedMemoryRange pNext(long value)
Sets the specified value to thepNext
field.
-
memory
public VkMappedMemoryRange memory(long value)
Sets the specified value to thememory
field.
-
offset
public VkMappedMemoryRange offset(long value)
Sets the specified value to theoffset
field.
-
size
public VkMappedMemoryRange size(long value)
Sets the specified value to thesize
field.
-
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 newVkMappedMemoryRange
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkMappedMemoryRange calloc()
Returns a newVkMappedMemoryRange
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkMappedMemoryRange create()
Returns a newVkMappedMemoryRange
instance allocated withBufferUtils
.
-
create
public static VkMappedMemoryRange create(long address)
Returns a newVkMappedMemoryRange
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkMappedMemoryRange.Buffer malloc(int capacity)
Returns a newVkMappedMemoryRange.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkMappedMemoryRange.Buffer calloc(int capacity)
Returns a newVkMappedMemoryRange.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkMappedMemoryRange.Buffer create(int capacity)
Returns a newVkMappedMemoryRange.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkMappedMemoryRange.Buffer create(long address, int capacity)
Create aVkMappedMemoryRange.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkMappedMemoryRange mallocStack()
Returns a newVkMappedMemoryRange
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkMappedMemoryRange callocStack()
Returns a newVkMappedMemoryRange
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkMappedMemoryRange mallocStack(MemoryStack stack)
Returns a newVkMappedMemoryRange
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkMappedMemoryRange callocStack(MemoryStack stack)
Returns a newVkMappedMemoryRange
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkMappedMemoryRange.Buffer callocStack(int capacity)
Returns a newVkMappedMemoryRange.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkMappedMemoryRange.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkMappedMemoryRange.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-