elect
03/03/2019, 6:53 PMprotected fun prepareStandardSemaphores(device: VulkanDevice): ConcurrentHashMap<StandardSemaphores, VkSemaphore_Array> {
val map = ConcurrentHashMap<StandardSemaphores, VkSemaphore_Array>()
StandardSemaphores.values().forEach {
map[it] = VkSemaphore_Array(swapchain.images.size) {
vkDev.createSemaphore(semaphoreCreateInfo)
}
}
return map
}
Dominaezzz
03/03/2019, 7:11 PMprotected fun prepareStandardSemaphores(device: VulkanDevice): ConcurrentHashMap<StandardSemaphores, VkSemaphore_Array> {
return StandardSemaphores.values().associateWithTo(ConcurrentHashMap()) {
VkSemaphore_Array(swapchain.images.size) {
vkDev.createSemaphore(semaphoreCreateInfo)
}
}
}
Dominaezzz
03/03/2019, 7:12 PMelect
03/03/2019, 7:13 PMsitepodmatt
03/04/2019, 3:43 AMelect
03/04/2019, 6:28 PMassociateByTo
is that it maps K and V the other way round as I would like itDominaezzz
03/04/2019, 6:30 PMassociateWithTo
?elect
03/04/2019, 6:30 PMDominaezzz
03/04/2019, 6:30 PMelect
03/04/2019, 6:31 PMCharSequence
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/associate-with-to.htmlDominaezzz
03/04/2019, 6:31 PMelect
03/04/2019, 6:32 PMelect
03/04/2019, 6:37 PMArray<T>
isnt recognized as Iterator<T>
, although it has
/**
* Creates an iterator for iterating over the elements of the array.
*/
public operator fun iterator(): Iterator<T>
Dominaezzz
03/04/2019, 6:38 PMArray
doesn't implement Iterable
.Dominaezzz
03/04/2019, 6:38 PMasList()
on the array.