Andreas Sinz
fun 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 }
A modern programming language that makes developers happier.