Mercurial > games > semicongine
comparison tests/test_gltf.nim @ 1321:385dbd68a947
did: a TON of copy elimination, some tests run now waaaay faster
author | sam <sam@basx.dev> |
---|---|
date | Thu, 15 Aug 2024 12:12:27 +0700 |
parents | 7be3628298f5 |
children | 3ba2c180e52c |
comparison
equal
deleted
inserted
replaced
1320:19e3eedb9a41 | 1321:385dbd68a947 |
---|---|
134 renderdata.flushAllMemory() | 134 renderdata.flushAllMemory() |
135 | 135 |
136 proc drawNode(commandbuffer: VkCommandBuffer, pipeline: Pipeline, nodeId: int, transform: Mat4) = | 136 proc drawNode(commandbuffer: VkCommandBuffer, pipeline: Pipeline, nodeId: int, transform: Mat4) = |
137 let nodeTransform = gltfData.nodes[nodeId].transform * transform | 137 let nodeTransform = gltfData.nodes[nodeId].transform * transform |
138 if gltfData.nodes[nodeId].mesh >= 0: | 138 if gltfData.nodes[nodeId].mesh >= 0: |
139 for primitive in gltfData.meshes[gltfData.nodes[nodeId].mesh]: | 139 for primitive in gltfData.meshes[gltfData.nodes[nodeId].mesh].mitems: |
140 renderWithPushConstant( | 140 renderWithPushConstant( |
141 commandbuffer = commandbuffer, | 141 commandbuffer = commandbuffer, |
142 pipeline = pipeline, | 142 pipeline = pipeline, |
143 mesh = primitive[0], | 143 mesh = primitive[0], |
144 pushConstant = ObjectData(transform: nodeTransform, materialId: primitive[0].material) | 144 pushConstant = ObjectData(transform: nodeTransform, materialId: primitive[0].material) |