Package org.lwjgl.vulkan
Class VkVertexInputAttributeDescription
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkVertexInputAttributeDescription
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkVertexInputAttributeDescription extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying vertex input attribute description.Valid Usage
location
must be less thanVkPhysicalDeviceLimits
::maxVertexInputAttributes
binding
must be less thanVkPhysicalDeviceLimits
::maxVertexInputBindings
offset
must be less than or equal toVkPhysicalDeviceLimits
::maxVertexInputAttributeOffset
format
must be allowed as a vertex buffer format, as specified by theFORMAT_FEATURE_VERTEX_BUFFER_BIT
flag inVkFormatProperties
::bufferFeatures
returned byvkGetPhysicalDeviceFormatProperties
Valid Usage (Implicit)
format
must be a validVkFormat
value
See Also
VkPipelineVertexInputStateCreateInfo
Member documentation
location
– the shader binding location number for this attribute.binding
– the binding number which this attribute takes its data from.format
– the size and type of the vertex attribute data.offset
– a byte offset of this attribute relative to the start of an element in the vertex input binding.
Layout
struct VkVertexInputAttributeDescription { uint32_t location; uint32_t binding; VkFormat format; uint32_t offset; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkVertexInputAttributeDescription.Buffer
An array ofVkVertexInputAttributeDescription
structs.
-
Constructor Summary
Constructors Constructor Description VkVertexInputAttributeDescription(java.nio.ByteBuffer container)
Creates aVkVertexInputAttributeDescription
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
binding()
Returns the value of thebinding
field.VkVertexInputAttributeDescription
binding(int value)
Sets the specified value to thebinding
field.static VkVertexInputAttributeDescription
calloc()
Returns a newVkVertexInputAttributeDescription
instance allocated withmemCalloc
.static VkVertexInputAttributeDescription.Buffer
calloc(int capacity)
Returns a newVkVertexInputAttributeDescription.Buffer
instance allocated withmemCalloc
.static VkVertexInputAttributeDescription
callocStack()
Returns a newVkVertexInputAttributeDescription
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkVertexInputAttributeDescription.Buffer
callocStack(int capacity)
Returns a newVkVertexInputAttributeDescription.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkVertexInputAttributeDescription.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputAttributeDescription.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkVertexInputAttributeDescription
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputAttributeDescription
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkVertexInputAttributeDescription
create()
Returns a newVkVertexInputAttributeDescription
instance allocated withBufferUtils
.static VkVertexInputAttributeDescription.Buffer
create(int capacity)
Returns a newVkVertexInputAttributeDescription.Buffer
instance allocated withBufferUtils
.static VkVertexInputAttributeDescription
create(long address)
Returns a newVkVertexInputAttributeDescription
instance for the specified memory address.static VkVertexInputAttributeDescription.Buffer
create(long address, int capacity)
Create aVkVertexInputAttributeDescription.Buffer
instance at the specified memory.static VkVertexInputAttributeDescription
createSafe(long address)
static VkVertexInputAttributeDescription.Buffer
createSafe(long address, int capacity)
int
format()
Returns the value of theformat
field.VkVertexInputAttributeDescription
format(int value)
Sets the specified value to theformat
field.int
location()
Returns the value of thelocation
field.VkVertexInputAttributeDescription
location(int value)
Sets the specified value to thelocation
field.static VkVertexInputAttributeDescription
malloc()
Returns a newVkVertexInputAttributeDescription
instance allocated withmemAlloc
.static VkVertexInputAttributeDescription.Buffer
malloc(int capacity)
Returns a newVkVertexInputAttributeDescription.Buffer
instance allocated withmemAlloc
.static VkVertexInputAttributeDescription
mallocStack()
Returns a newVkVertexInputAttributeDescription
instance allocated on the thread-localMemoryStack
.static VkVertexInputAttributeDescription.Buffer
mallocStack(int capacity)
Returns a newVkVertexInputAttributeDescription.Buffer
instance allocated on the thread-localMemoryStack
.static VkVertexInputAttributeDescription.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputAttributeDescription.Buffer
instance allocated on the specifiedMemoryStack
.static VkVertexInputAttributeDescription
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputAttributeDescription
instance allocated on the specifiedMemoryStack
.static int
nbinding(long struct)
Unsafe version ofbinding()
.static void
nbinding(long struct, int value)
Unsafe version ofbinding
.static int
nformat(long struct)
Unsafe version offormat()
.static void
nformat(long struct, int value)
Unsafe version offormat
.static int
nlocation(long struct)
Unsafe version oflocation()
.static void
nlocation(long struct, int value)
Unsafe version oflocation
.static int
noffset(long struct)
Unsafe version ofoffset()
.static void
noffset(long struct, int value)
Unsafe version ofoffset
.int
offset()
Returns the value of theoffset
field.VkVertexInputAttributeDescription
offset(int value)
Sets the specified value to theoffset
field.VkVertexInputAttributeDescription
set(int location, int binding, int format, int offset)
Initializes this struct with the specified values.VkVertexInputAttributeDescription
set(VkVertexInputAttributeDescription src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
VkVertexInputAttributeDescription
public VkVertexInputAttributeDescription(java.nio.ByteBuffer container)
Creates aVkVertexInputAttributeDescription
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
-
location
public int location()
Returns the value of thelocation
field.
-
binding
public int binding()
Returns the value of thebinding
field.
-
format
public int format()
Returns the value of theformat
field.
-
offset
public int offset()
Returns the value of theoffset
field.
-
location
public VkVertexInputAttributeDescription location(int value)
Sets the specified value to thelocation
field.
-
binding
public VkVertexInputAttributeDescription binding(int value)
Sets the specified value to thebinding
field.
-
format
public VkVertexInputAttributeDescription format(int value)
Sets the specified value to theformat
field.
-
offset
public VkVertexInputAttributeDescription offset(int value)
Sets the specified value to theoffset
field.
-
set
public VkVertexInputAttributeDescription set(int location, int binding, int format, int offset)
Initializes this struct with the specified values.
-
set
public VkVertexInputAttributeDescription set(VkVertexInputAttributeDescription src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkVertexInputAttributeDescription malloc()
Returns a newVkVertexInputAttributeDescription
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkVertexInputAttributeDescription calloc()
Returns a newVkVertexInputAttributeDescription
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkVertexInputAttributeDescription create()
Returns a newVkVertexInputAttributeDescription
instance allocated withBufferUtils
.
-
create
public static VkVertexInputAttributeDescription create(long address)
Returns a newVkVertexInputAttributeDescription
instance for the specified memory address.
-
createSafe
@Nullable public static VkVertexInputAttributeDescription createSafe(long address)
-
malloc
public static VkVertexInputAttributeDescription.Buffer malloc(int capacity)
Returns a newVkVertexInputAttributeDescription.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkVertexInputAttributeDescription.Buffer calloc(int capacity)
Returns a newVkVertexInputAttributeDescription.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkVertexInputAttributeDescription.Buffer create(int capacity)
Returns a newVkVertexInputAttributeDescription.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkVertexInputAttributeDescription.Buffer create(long address, int capacity)
Create aVkVertexInputAttributeDescription.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkVertexInputAttributeDescription.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkVertexInputAttributeDescription mallocStack()
Returns a newVkVertexInputAttributeDescription
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkVertexInputAttributeDescription callocStack()
Returns a newVkVertexInputAttributeDescription
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkVertexInputAttributeDescription mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputAttributeDescription
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkVertexInputAttributeDescription callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputAttributeDescription
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkVertexInputAttributeDescription.Buffer mallocStack(int capacity)
Returns a newVkVertexInputAttributeDescription.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkVertexInputAttributeDescription.Buffer callocStack(int capacity)
Returns a newVkVertexInputAttributeDescription.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkVertexInputAttributeDescription.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputAttributeDescription.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkVertexInputAttributeDescription.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputAttributeDescription.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nlocation
public static int nlocation(long struct)
Unsafe version oflocation()
.
-
nbinding
public static int nbinding(long struct)
Unsafe version ofbinding()
.
-
nformat
public static int nformat(long struct)
Unsafe version offormat()
.
-
noffset
public static int noffset(long struct)
Unsafe version ofoffset()
.
-
nlocation
public static void nlocation(long struct, int value)
Unsafe version oflocation
.
-
nbinding
public static void nbinding(long struct, int value)
Unsafe version ofbinding
.
-
nformat
public static void nformat(long struct, int value)
Unsafe version offormat
.
-
noffset
public static void noffset(long struct, int value)
Unsafe version ofoffset
.
-
-