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.NativeResourceStructure 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
bindingmust be less thanVkPhysicalDeviceLimits::maxVertexInputBindings- If the
vertexAttributeInstanceRateZeroDivisorfeature is not enabled,divisormust not be 0 - If the
vertexAttributeInstanceRateDivisorfeature is not enabled,divisormust be 1 divisormust be a value between 0 andVkPhysicalDeviceVertexAttributeDivisorPropertiesEXT::maxVertexAttribDivisor, inclusive.VkVertexInputBindingDescription::inputRatemust be of typeVERTEX_INPUT_RATE_INSTANCEfor thisbinding.
See Also
VkPipelineVertexInputDivisorStateCreateInfoEXTMember 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 thevertexAttributeInstanceRateZeroDivisorfeature 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 classVkVertexInputBindingDivisorDescriptionEXT.BufferAn array ofVkVertexInputBindingDivisorDescriptionEXTstructs.
-
Constructor Summary
Constructors Constructor Description VkVertexInputBindingDivisorDescriptionEXT(java.nio.ByteBuffer container)Creates aVkVertexInputBindingDivisorDescriptionEXTinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intbinding()Returns the value of thebindingfield.VkVertexInputBindingDivisorDescriptionEXTbinding(int value)Sets the specified value to thebindingfield.static VkVertexInputBindingDivisorDescriptionEXTcalloc()Returns a newVkVertexInputBindingDivisorDescriptionEXTinstance allocated withmemCalloc.static VkVertexInputBindingDivisorDescriptionEXT.Buffercalloc(int capacity)Returns a newVkVertexInputBindingDivisorDescriptionEXT.Bufferinstance allocated withmemCalloc.static VkVertexInputBindingDivisorDescriptionEXTcallocStack()Returns a newVkVertexInputBindingDivisorDescriptionEXTinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkVertexInputBindingDivisorDescriptionEXT.BuffercallocStack(int capacity)Returns a newVkVertexInputBindingDivisorDescriptionEXT.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkVertexInputBindingDivisorDescriptionEXT.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkVertexInputBindingDivisorDescriptionEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkVertexInputBindingDivisorDescriptionEXTcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkVertexInputBindingDivisorDescriptionEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkVertexInputBindingDivisorDescriptionEXTcreate()Returns a newVkVertexInputBindingDivisorDescriptionEXTinstance allocated withBufferUtils.static VkVertexInputBindingDivisorDescriptionEXT.Buffercreate(int capacity)Returns a newVkVertexInputBindingDivisorDescriptionEXT.Bufferinstance allocated withBufferUtils.static VkVertexInputBindingDivisorDescriptionEXTcreate(long address)Returns a newVkVertexInputBindingDivisorDescriptionEXTinstance for the specified memory address.static VkVertexInputBindingDivisorDescriptionEXT.Buffercreate(long address, int capacity)Create aVkVertexInputBindingDivisorDescriptionEXT.Bufferinstance at the specified memory.static VkVertexInputBindingDivisorDescriptionEXTcreateSafe(long address)static VkVertexInputBindingDivisorDescriptionEXT.BuffercreateSafe(long address, int capacity)intdivisor()Returns the value of thedivisorfield.VkVertexInputBindingDivisorDescriptionEXTdivisor(int value)Sets the specified value to thedivisorfield.static VkVertexInputBindingDivisorDescriptionEXTmalloc()Returns a newVkVertexInputBindingDivisorDescriptionEXTinstance allocated withmemAlloc.static VkVertexInputBindingDivisorDescriptionEXT.Buffermalloc(int capacity)Returns a newVkVertexInputBindingDivisorDescriptionEXT.Bufferinstance allocated withmemAlloc.static VkVertexInputBindingDivisorDescriptionEXTmallocStack()Returns a newVkVertexInputBindingDivisorDescriptionEXTinstance allocated on the thread-localMemoryStack.static VkVertexInputBindingDivisorDescriptionEXT.BuffermallocStack(int capacity)Returns a newVkVertexInputBindingDivisorDescriptionEXT.Bufferinstance allocated on the thread-localMemoryStack.static VkVertexInputBindingDivisorDescriptionEXT.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkVertexInputBindingDivisorDescriptionEXT.Bufferinstance allocated on the specifiedMemoryStack.static VkVertexInputBindingDivisorDescriptionEXTmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkVertexInputBindingDivisorDescriptionEXTinstance allocated on the specifiedMemoryStack.static intnbinding(long struct)Unsafe version ofbinding().static voidnbinding(long struct, int value)Unsafe version ofbinding.static intndivisor(long struct)Unsafe version ofdivisor().static voidndivisor(long struct, int value)Unsafe version ofdivisor.VkVertexInputBindingDivisorDescriptionEXTset(int binding, int divisor)Initializes this struct with the specified values.VkVertexInputBindingDivisorDescriptionEXTset(VkVertexInputBindingDivisorDescriptionEXT src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
VkVertexInputBindingDivisorDescriptionEXT
public VkVertexInputBindingDivisorDescriptionEXT(java.nio.ByteBuffer container)
Creates aVkVertexInputBindingDivisorDescriptionEXTinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
binding
public int binding()
Returns the value of thebindingfield.
-
divisor
public int divisor()
Returns the value of thedivisorfield.
-
binding
public VkVertexInputBindingDivisorDescriptionEXT binding(int value)
Sets the specified value to thebindingfield.
-
divisor
public VkVertexInputBindingDivisorDescriptionEXT divisor(int value)
Sets the specified value to thedivisorfield.
-
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 newVkVertexInputBindingDivisorDescriptionEXTinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkVertexInputBindingDivisorDescriptionEXT calloc()
Returns a newVkVertexInputBindingDivisorDescriptionEXTinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkVertexInputBindingDivisorDescriptionEXT create()
Returns a newVkVertexInputBindingDivisorDescriptionEXTinstance allocated withBufferUtils.
-
create
public static VkVertexInputBindingDivisorDescriptionEXT create(long address)
Returns a newVkVertexInputBindingDivisorDescriptionEXTinstance for the specified memory address.
-
createSafe
@Nullable public static VkVertexInputBindingDivisorDescriptionEXT createSafe(long address)
-
malloc
public static VkVertexInputBindingDivisorDescriptionEXT.Buffer malloc(int capacity)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkVertexInputBindingDivisorDescriptionEXT.Buffer calloc(int capacity)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkVertexInputBindingDivisorDescriptionEXT.Buffer create(int capacity)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkVertexInputBindingDivisorDescriptionEXT.Buffer create(long address, int capacity)
Create aVkVertexInputBindingDivisorDescriptionEXT.Bufferinstance 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 newVkVertexInputBindingDivisorDescriptionEXTinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkVertexInputBindingDivisorDescriptionEXT callocStack()
Returns a newVkVertexInputBindingDivisorDescriptionEXTinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkVertexInputBindingDivisorDescriptionEXT mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputBindingDivisorDescriptionEXTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkVertexInputBindingDivisorDescriptionEXT callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkVertexInputBindingDivisorDescriptionEXTinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkVertexInputBindingDivisorDescriptionEXT.Buffer callocStack(int capacity)
Returns a newVkVertexInputBindingDivisorDescriptionEXT.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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.
-
-