Mercurial > games > semicongine
comparison src/vulkan_api/vulkan_api_generator.nim @ 558:affa6571a2c9
add: swapchain, images, fix some destroctors
author | Sam <sam@basx.dev> |
---|---|
date | Thu, 02 Mar 2023 23:16:45 +0700 |
parents | 7c44f714bd03 |
children | 7f921d7d0a2b |
comparison
equal
deleted
inserted
replaced
557:e2d8c02f1548 | 558:affa6571a2c9 |
---|---|
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": @[], |