Class EXTVertexAttributeDivisor

java.lang.Object
org.lwjgl.vulkan.EXTVertexAttributeDivisor

public final class EXTVertexAttributeDivisor extends Object
This extension allows instance-rate vertex attributes to be repeated for certain number of instances instead of advancing for every instance when instanced rendering is enabled.
Examples

To create a vertex binding such that the first binding uses instanced rendering and the same attribute is used for every 4 draw instances, an application could use the following set of structures:


     const VkVertexInputBindingDivisorDescriptionEXT divisorDesc =
     {
         .binding = 0,
         .divisor = 4
     };
 
     const VkPipelineVertexInputDivisorStateCreateInfoEXT divisorInfo =
     {
         .sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT,
         .pNext = NULL,
         .vertexBindingDivisorCount = 1,
         .pVertexBindingDivisors = &divisorDesc
     }
 
     const VkVertexInputBindingDescription binding =
     {
         .binding = 0,
         .stride = sizeof(Vertex),
         .inputRate = VK_VERTEX_INPUT_RATE_INSTANCE
     };
 
     const VkPipelineVertexInputStateCreateInfo viInfo =
     {
         .sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_CREATE_INFO,
         .pNext = &divisorInfo,
         ...
     };
     //...
Name String
VK_EXT_vertex_attribute_divisor
Extension Type
Device extension
Registered Extension Number
191
Revision
3
Extension and Version Dependencies
VK_KHR_get_physical_device_properties2 or Version 1.1
Deprecation State
Contact
Other Extension Metadata
Last Modified Date
2018-08-03
IP Status
No known IP claims.
Contributors
  • Vikram Kushwaha, NVIDIA
  • Faith Ekstrand, Intel