Code: Select all

```
transformState.mdlvMtx = glm::mat4{1.0f};
transformState.mdlvMtx = glm::translate(transformState.mdlvMtx, glm::vec3{0.0f, 0.0f, -3.0f});
transformState.mdlvMtx = glm::rotate(transformState.mdlvMtx, sinf(period2 * tau) * tau / 8.0f, glm::vec3{1.0f, 0.0f, 0.0f});
transformState.mdlvMtx = glm::rotate(transformState.mdlvMtx, -period1 * tau, glm::vec3{0.0f, 1.0f, 0.0f});
transformState.mdlvMtx = glm::scale(transformState.mdlvMtx, glm::vec3{0.5f});
render();
```

Code: Select all

```
transformState.mdlvMtx = glm::mat4{1.0f};
transformState.mdlvMtx = glm::translate(transformState.mdlvMtx, glm::vec3{0.0f, 0.0f, -3.0f});
transformState.mdlvMtx = glm::rotate(transformState.mdlvMtx, sinf(period2 * tau) * tau / 8.0f, glm::vec3{1.0f, 0.0f, 0.0f});
transformState.mdlvMtx = glm::rotate(transformState.mdlvMtx, -period1 * tau, glm::vec3{0.0f, 1.0f, 0.0f});
transformState.mdlvMtx = glm::scale(transformState.mdlvMtx, glm::vec3{0.5f});
render();
transformState.mdlvMtx = glm::mat4{1.0f};
transformState.mdlvMtx = glm::translate(transformState.mdlvMtx, glm::vec3{1.5f, 0.0f, -3.0f});
transformState.mdlvMtx = glm::rotate(transformState.mdlvMtx, sinf(period2 * tau) * tau / 8.0f, glm::vec3{1.0f, 0.0f, 0.0f});
transformState.mdlvMtx = glm::rotate(transformState.mdlvMtx, -period1 * tau, glm::vec3{0.0f, 1.0f, 0.0f});
transformState.mdlvMtx = glm::scale(transformState.mdlvMtx, glm::vec3{0.65f});
render();
```

Code: Select all

```
dynmem.begin(dyncmd);
dyncmd.pushConstants(transformUniformBuffer.getGpuAddr(), transformUniformBuffer.getSize(),0, sizeof(transformState), &transformState);
queue.submitCommands(dynmem.end(dyncmd));
int slot = queue.acquireImage(swapchain);
queue.submitCommands(framebuffer_cmdlists[slot]);
queue.submitCommands(render_cmdlist);
queue.presentImage(swapchain, slot);
```