Package org.lwjgl.vulkan
Class VkVertexInputBindingDivisorDescriptionEXT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkVertexInputBindingDivisorDescriptionEXT
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkVertexInputBindingDivisorDescriptionEXT extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying a divisor used in instanced rendering.Description
If this structure is not used to define a divisor value for an attribute then the divisor has a logical default value of 1.
Valid Usage
binding
must be less thanVkPhysicalDeviceLimits
::maxVertexInputBindings
- If the
vertexAttributeInstanceRateZeroDivisor
feature is not enabled,divisor
must not be 0 - If the
vertexAttributeInstanceRateDivisor
feature is not enabled,divisor
must be 1 divisor
must be a value between 0 andVkPhysicalDeviceVertexAttributeDivisorPropertiesEXT
::maxVertexAttribDivisor
, inclusive.VkVertexInputBindingDescription
::inputRate
must be of typeVERTEX_INPUT_RATE_INSTANCE
for thisbinding
.
See Also
VkPipelineVertexInputDivisorStateCreateInfoEXT
Member documentation
binding
– the binding number for which the divisor is specified.divisor
– the number of successive instances that will use the same value of the vertex attribute when instanced rendering is enabled. For example, if the divisor is N, the same vertex attribute will applied to N successive instances before moving on to the next vertex attribute. The maximum value of divisor is implementation dependent and can be queried usingVkPhysicalDeviceVertexAttributeDivisorPropertiesEXT
::maxVertexAttribDivisor
. A value of 0 can be used for the divisor if thevertexAttributeInstanceRateZeroDivisor
feature is enabled. In this case, the same vertex attribute will be applied to all instances.
Layout
struct VkVertexInputBindingDivisorDescriptionEXT { uint32_t binding; uint32_t divisor; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkVertexInputBindingDivisorDescriptionEXT.Buffer
An array ofVkVertexInputBindingDivisorDescriptionEXT
structs.
-
Constructor Summary
Constructors Constructor Description VkVertexInputBindingDivisorDescriptionEXT(java.nio.ByteBuffer container)
Creates aVkVertexInputBindingDivisorDescriptionEXT
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.VkVertexInputBindingDivisorDescriptionEXT
binding(int value)
Sets the specified value to thebinding
field.static VkVertexInputBindingDivisorDescriptionEXT
calloc()
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance allocated withmemCalloc
.static VkVertexInputBindingDivisorDescriptionEXT.Buffer
calloc(int capacity)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance allocated withmemCalloc
.static VkVertexInputBindingDivisorDescriptionEXT
callocStack()
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkVertexInputBindingDivisorDescriptionEXT.Buffer
callocStack(int capacity)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkVertexInputBindingDivisorDescriptionEXT.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkVertexInputBindingDivisorDescriptionEXT
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkVertexInputBindingDivisorDescriptionEXT
create()
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance allocated withBufferUtils
.static VkVertexInputBindingDivisorDescriptionEXT.Buffer
create(int capacity)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance allocated withBufferUtils
.static VkVertexInputBindingDivisorDescriptionEXT
create(long address)
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance for the specified memory address.static VkVertexInputBindingDivisorDescriptionEXT.Buffer
create(long address, int capacity)
Create aVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance at the specified memory.static VkVertexInputBindingDivisorDescriptionEXT
createSafe(long address)
static VkVertexInputBindingDivisorDescriptionEXT.Buffer
createSafe(long address, int capacity)
int
divisor()
Returns the value of thedivisor
field.VkVertexInputBindingDivisorDescriptionEXT
divisor(int value)
Sets the specified value to thedivisor
field.static VkVertexInputBindingDivisorDescriptionEXT
malloc()
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance allocated withmemAlloc
.static VkVertexInputBindingDivisorDescriptionEXT.Buffer
malloc(int capacity)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance allocated withmemAlloc
.static VkVertexInputBindingDivisorDescriptionEXT
mallocStack()
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance allocated on the thread-localMemoryStack
.static VkVertexInputBindingDivisorDescriptionEXT.Buffer
mallocStack(int capacity)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance allocated on the thread-localMemoryStack
.static VkVertexInputBindingDivisorDescriptionEXT.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance allocated on the specifiedMemoryStack
.static VkVertexInputBindingDivisorDescriptionEXT
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputBindingDivisorDescriptionEXT
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
ndivisor(long struct)
Unsafe version ofdivisor()
.static void
ndivisor(long struct, int value)
Unsafe version ofdivisor
.VkVertexInputBindingDivisorDescriptionEXT
set(int binding, int divisor)
Initializes this struct with the specified values.VkVertexInputBindingDivisorDescriptionEXT
set(VkVertexInputBindingDivisorDescriptionEXT src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
VkVertexInputBindingDivisorDescriptionEXT
public VkVertexInputBindingDivisorDescriptionEXT(java.nio.ByteBuffer container)
Creates aVkVertexInputBindingDivisorDescriptionEXT
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
-
binding
public int binding()
Returns the value of thebinding
field.
-
divisor
public int divisor()
Returns the value of thedivisor
field.
-
binding
public VkVertexInputBindingDivisorDescriptionEXT binding(int value)
Sets the specified value to thebinding
field.
-
divisor
public VkVertexInputBindingDivisorDescriptionEXT divisor(int value)
Sets the specified value to thedivisor
field.
-
set
public VkVertexInputBindingDivisorDescriptionEXT set(int binding, int divisor)
Initializes this struct with the specified values.
-
set
public VkVertexInputBindingDivisorDescriptionEXT set(VkVertexInputBindingDivisorDescriptionEXT src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkVertexInputBindingDivisorDescriptionEXT malloc()
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkVertexInputBindingDivisorDescriptionEXT calloc()
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkVertexInputBindingDivisorDescriptionEXT create()
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance allocated withBufferUtils
.
-
create
public static VkVertexInputBindingDivisorDescriptionEXT create(long address)
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance for the specified memory address.
-
createSafe
@Nullable public static VkVertexInputBindingDivisorDescriptionEXT createSafe(long address)
-
malloc
public static VkVertexInputBindingDivisorDescriptionEXT.Buffer malloc(int capacity)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkVertexInputBindingDivisorDescriptionEXT.Buffer calloc(int capacity)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkVertexInputBindingDivisorDescriptionEXT.Buffer create(int capacity)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkVertexInputBindingDivisorDescriptionEXT.Buffer create(long address, int capacity)
Create aVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkVertexInputBindingDivisorDescriptionEXT.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkVertexInputBindingDivisorDescriptionEXT mallocStack()
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkVertexInputBindingDivisorDescriptionEXT callocStack()
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkVertexInputBindingDivisorDescriptionEXT mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkVertexInputBindingDivisorDescriptionEXT callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputBindingDivisorDescriptionEXT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkVertexInputBindingDivisorDescriptionEXT.Buffer mallocStack(int capacity)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkVertexInputBindingDivisorDescriptionEXT.Buffer callocStack(int capacity)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkVertexInputBindingDivisorDescriptionEXT.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkVertexInputBindingDivisorDescriptionEXT.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nbinding
public static int nbinding(long struct)
Unsafe version ofbinding()
.
-
ndivisor
public static int ndivisor(long struct)
Unsafe version ofdivisor()
.
-
nbinding
public static void nbinding(long struct, int value)
Unsafe version ofbinding
.
-
ndivisor
public static void ndivisor(long struct, int value)
Unsafe version ofdivisor
.
-
-