comparison src/vulkan_api/vulkan_api_generator.nim @ 97:110ed3ee5df8

add: swapchain, images, fix some destroctors
author Sam <sam@basx.dev>
date Thu, 02 Mar 2023 23:16:45 +0700
parents f036546f5ea2
children 7f921d7d0a2b
comparison
equal deleted inserted replaced
96:b9fc90de1450 97:110ed3ee5df8
452 """ 452 """
453 # custom enum iteration (for enum values > 2^16) 453 # custom enum iteration (for enum values > 2^16)
454 macro enumFullRange(a: typed): untyped = 454 macro enumFullRange(a: typed): untyped =
455 newNimNode(nnkBracket).add(a.getType[1][1..^1]) 455 newNimNode(nnkBracket).add(a.getType[1][1..^1])
456 456
457 iterator items[T: HoleyEnum](E: typedesc[T]): T = 457 iterator items*[T: HoleyEnum](E: typedesc[T]): T =
458 for a in enumFullRange(E): yield a""", 458 for a in enumFullRange(E): yield a""",
459 ], 459 ],
460 "structs": @["type"], 460 "structs": @["type"],
461 "enums": @["type"], 461 "enums": @["type"],
462 "commands": @[], 462 "commands": @[],