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