|
Monad Engine da02fba2
> Undercity Codex_
|
#include <Renderer.h>
Public Member Functions | |
| Renderer (Context &ctx, Swapchain &swap) | |
| ~Renderer () | |
| Renderer (const Renderer &)=delete | |
| Renderer & | operator= (const Renderer &)=delete |
| bool | DrawFrame (float clearR, float clearG, float clearB) |
| void | WaitIdle () const |
Static Public Attributes | |
| static constexpr uint32_t | kFramesInFlight = 2 |
Definition at line 23 of file Renderer.h.
Definition at line 23 of file Renderer.cpp.
| mnd::vk::Renderer::~Renderer | ( | ) |
Definition at line 30 of file Renderer.cpp.
References mnd::vk::Context::GetDevice(), and kFramesInFlight.
|
delete |
| bool mnd::vk::Renderer::DrawFrame | ( | float | clearR, |
| float | clearG, | ||
| float | clearB | ||
| ) |
Record + submit + present one frame. Returns false if the swapchain went out-of-date and the caller should rebuild it before calling again.
Definition at line 118 of file Renderer.cpp.
References mnd::vk::Swapchain::Get(), mnd::vk::Context::GetDevice(), mnd::vk::Context::GetGraphicsQueue(), mnd::vk::Context::GetPresentQueue(), and kFramesInFlight.
Referenced by main().
| void mnd::vk::Renderer::WaitIdle | ( | ) | const |
Block until the GPU is idle. Call before destroying anything bound to the swapchain or device.
Definition at line 45 of file Renderer.cpp.
References mnd::vk::Context::GetDevice().
Referenced by main().
|
staticconstexpr |
Definition at line 26 of file Renderer.h.
Referenced by ~Renderer(), and DrawFrame().