Andreas Sinz
04/26/2018, 4:59 PMfun createVKVertexInputAttributeDescriptionUpdater(binding: Int, location: Int, format: VkFormat, offset: Int): (VkVertexInputAttributeDescription) -> Unit = {
it.location = location
it.binding = binding
it.format = format
it.offset = offset
}
inline fun VertexInputAttributeDescription(vararg updaters: (VkVertexInputAttributeDescription) -> Unit): VkVertexInputAttributeDescription.Buffer {
val res = VertexInputAttributeDescription(updaters.size)
updaters.forEachIndexed { idx, updater -> updater(res[idx]) }
return res
}