Package org.lwjgl.vulkan
Class VkBaseOutStructure
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkBaseOutStructure
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkBaseOutStructure extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Base structure for a read-only pointer chain.Description
VkBaseOutStructure
can be used to facilitate iterating through a structure pointer chain that returns data back to the application.See Also
Member documentation
sType
– the structure type of the structure being iterated through.pNext
–NULL
or a pointer to the next structure in a structure chain.
Layout
struct VkBaseOutStructure { VkStructureType sType;
VkBaseOutStructure
* pNext; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkBaseOutStructure.Buffer
An array ofVkBaseOutStructure
structs.
-
Constructor Summary
Constructors Constructor Description VkBaseOutStructure(java.nio.ByteBuffer container)
Creates aVkBaseOutStructure
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 VkBaseOutStructure
calloc()
Returns a newVkBaseOutStructure
instance allocated withmemCalloc
.static VkBaseOutStructure.Buffer
calloc(int capacity)
Returns a newVkBaseOutStructure.Buffer
instance allocated withmemCalloc
.static VkBaseOutStructure
callocStack()
Returns a newVkBaseOutStructure
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkBaseOutStructure.Buffer
callocStack(int capacity)
Returns a newVkBaseOutStructure.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkBaseOutStructure.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkBaseOutStructure.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkBaseOutStructure
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkBaseOutStructure
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkBaseOutStructure
create()
Returns a newVkBaseOutStructure
instance allocated withBufferUtils
.static VkBaseOutStructure.Buffer
create(int capacity)
Returns a newVkBaseOutStructure.Buffer
instance allocated withBufferUtils
.static VkBaseOutStructure
create(long address)
Returns a newVkBaseOutStructure
instance for the specified memory address.static VkBaseOutStructure.Buffer
create(long address, int capacity)
Create aVkBaseOutStructure.Buffer
instance at the specified memory.static VkBaseOutStructure
createSafe(long address)
static VkBaseOutStructure.Buffer
createSafe(long address, int capacity)
static VkBaseOutStructure
malloc()
Returns a newVkBaseOutStructure
instance allocated withmemAlloc
.static VkBaseOutStructure.Buffer
malloc(int capacity)
Returns a newVkBaseOutStructure.Buffer
instance allocated withmemAlloc
.static VkBaseOutStructure
mallocStack()
Returns a newVkBaseOutStructure
instance allocated on the thread-localMemoryStack
.static VkBaseOutStructure.Buffer
mallocStack(int capacity)
Returns a newVkBaseOutStructure.Buffer
instance allocated on the thread-localMemoryStack
.static VkBaseOutStructure.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkBaseOutStructure.Buffer
instance allocated on the specifiedMemoryStack
.static VkBaseOutStructure
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkBaseOutStructure
instance allocated on the specifiedMemoryStack
.static VkBaseOutStructure
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, VkBaseOutStructure value)
Unsafe version ofpNext
.static int
nsType(long struct)
Unsafe version ofsType()
.static void
nsType(long struct, int value)
Unsafe version ofsType
.VkBaseOutStructure
pNext()
Returns aVkBaseOutStructure
view of the struct pointed to by thepNext
field.VkBaseOutStructure
pNext(VkBaseOutStructure value)
Sets the address of the specifiedVkBaseOutStructure
to thepNext
field.VkBaseOutStructure
set(int sType, VkBaseOutStructure pNext)
Initializes this struct with the specified values.VkBaseOutStructure
set(VkBaseOutStructure src)
Copies the specified struct data to this struct.int
sizeof()
int
sType()
Returns the value of thesType
field.VkBaseOutStructure
sType(int value)
Sets the specified value to thesType
field.
-
-
-
Constructor Detail
-
VkBaseOutStructure
public VkBaseOutStructure(java.nio.ByteBuffer container)
Creates aVkBaseOutStructure
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
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
@Nullable public VkBaseOutStructure pNext()
Returns aVkBaseOutStructure
view of the struct pointed to by thepNext
field.
-
sType
public VkBaseOutStructure sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkBaseOutStructure pNext(@Nullable VkBaseOutStructure value)
Sets the address of the specifiedVkBaseOutStructure
to thepNext
field.
-
set
public VkBaseOutStructure set(int sType, @Nullable VkBaseOutStructure pNext)
Initializes this struct with the specified values.
-
set
public VkBaseOutStructure set(VkBaseOutStructure src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkBaseOutStructure malloc()
Returns a newVkBaseOutStructure
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkBaseOutStructure calloc()
Returns a newVkBaseOutStructure
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkBaseOutStructure create()
Returns a newVkBaseOutStructure
instance allocated withBufferUtils
.
-
create
public static VkBaseOutStructure create(long address)
Returns a newVkBaseOutStructure
instance for the specified memory address.
-
createSafe
@Nullable public static VkBaseOutStructure createSafe(long address)
-
malloc
public static VkBaseOutStructure.Buffer malloc(int capacity)
Returns a newVkBaseOutStructure.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkBaseOutStructure.Buffer calloc(int capacity)
Returns a newVkBaseOutStructure.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkBaseOutStructure.Buffer create(int capacity)
Returns a newVkBaseOutStructure.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkBaseOutStructure.Buffer create(long address, int capacity)
Create aVkBaseOutStructure.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkBaseOutStructure.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkBaseOutStructure mallocStack()
Returns a newVkBaseOutStructure
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkBaseOutStructure callocStack()
Returns a newVkBaseOutStructure
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkBaseOutStructure mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkBaseOutStructure
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkBaseOutStructure callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkBaseOutStructure
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkBaseOutStructure.Buffer mallocStack(int capacity)
Returns a newVkBaseOutStructure.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkBaseOutStructure.Buffer callocStack(int capacity)
Returns a newVkBaseOutStructure.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkBaseOutStructure.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkBaseOutStructure.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkBaseOutStructure.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkBaseOutStructure.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nsType
public static int nsType(long struct)
Unsafe version ofsType()
.
-
npNext
@Nullable public static VkBaseOutStructure npNext(long struct)
Unsafe version ofpNext()
.
-
nsType
public static void nsType(long struct, int value)
Unsafe version ofsType
.
-
npNext
public static void npNext(long struct, @Nullable VkBaseOutStructure value)
Unsafe version ofpNext
.
-
-