Class for renderer. More...
#include <Renderer.hpp>
Public Member Functions | |
Renderer (Window &window, Device &device) | |
~Renderer () | |
Renderer (const Renderer &)=delete | |
Renderer & | operator= (const Renderer &)=delete |
Renderer (Renderer &&)=delete | |
Renderer & | operator= (Renderer &&)=delete |
VkRenderPass | getSwapChainRenderPass () const |
float | getAspectRatio () const |
bool | isFrameInProgress () const |
VkCommandBuffer | getCurrentCommandBuffer () const |
unsigned long | getFrameIndex () const |
std::array< float, 4 > | getClearColor () const |
Window & | getWindow () const |
void | setClearValue (const VkClearColorValue clearColorValue=DEFAULT_CLEAR_COLOR, const VkClearDepthStencilValue clearDepthValue=DEFAULT_CLEAR_DEPTH) |
VkCommandBuffer | beginFrame () |
void | endFrame () |
void | beginSwapChainRenderPass (VkCommandBuffer commandBuffer) const |
void | endSwapChainRenderPass (VkCommandBuffer commandBuffer) const |
Private Member Functions | |
void | createCommandBuffers () |
void | freeCommandBuffers () |
void | recreateSwapChain () |
Private Attributes | |
Window & | m_window |
Device & | m_device |
std::unique_ptr< SwapChain > | m_swapChain |
std::vector< VkCommandBuffer > | m_commandBuffers |
std::array< VkClearValue, 2 > | m_clearValues {DEFAULT_CLEAR_COLOR, 1.0F, 0.F} |
uint32_t | m_currentImageIndex {0} |
unsigned long | m_currentFrameIndex {0} |
bool | m_isFrameStarted {false} |
Class for renderer.
Definition at line 24 of file Renderer.hpp.
Definition at line 28 of file Renderer.hpp.
References createCommandBuffers(), and recreateSwapChain().
|
inline |
Definition at line 29 of file Renderer.hpp.
References freeCommandBuffers().
|
delete |
|
delete |
VkCommandBuffer ven::Renderer::beginFrame | ( | ) |
Definition at line 43 of file renderer.cpp.
void ven::Renderer::beginSwapChainRenderPass | ( | VkCommandBuffer | commandBuffer | ) | const |
Definition at line 89 of file renderer.cpp.
|
private |
Definition at line 3 of file renderer.cpp.
References ven::Device::device(), ven::Device::getCommandPool(), m_commandBuffers, m_device, and ven::MAX_FRAMES_IN_FLIGHT.
Referenced by Renderer().
void ven::Renderer::endFrame | ( | ) |
Definition at line 69 of file renderer.cpp.
References ven::MAX_FRAMES_IN_FLIGHT.
void ven::Renderer::endSwapChainRenderPass | ( | VkCommandBuffer | commandBuffer | ) | const |
Definition at line 119 of file renderer.cpp.
|
private |
Definition at line 17 of file renderer.cpp.
Referenced by ~Renderer().
|
inlinenodiscard |
Definition at line 37 of file Renderer.hpp.
References m_swapChain.
Referenced by ven::Gui::rendererSection().
|
inlinenodiscard |
Definition at line 42 of file Renderer.hpp.
References m_clearValues.
Referenced by ven::Gui::rendererSection().
|
inlinenodiscard |
Definition at line 39 of file Renderer.hpp.
References isFrameInProgress(), m_commandBuffers, and m_currentFrameIndex.
Referenced by ven::Gui::render().
|
inlinenodiscard |
Definition at line 41 of file Renderer.hpp.
References isFrameInProgress(), and m_currentFrameIndex.
|
inlinenodiscard |
Definition at line 36 of file Renderer.hpp.
References m_swapChain.
Referenced by ven::Engine::Engine().
|
inlinenodiscard |
Definition at line 49 of file Renderer.hpp.
References m_window.
Referenced by ven::Gui::rendererSection().
|
inlinenodiscard |
Definition at line 38 of file Renderer.hpp.
References m_isFrameStarted.
Referenced by getCurrentCommandBuffer(), and getFrameIndex().
|
private |
Definition at line 23 of file renderer.cpp.
Referenced by Renderer().
|
inline |
Definition at line 51 of file Renderer.hpp.
References m_clearValues.
Referenced by ven::Gui::rendererSection().
|
private |
Definition at line 67 of file Renderer.hpp.
Referenced by getClearColor(), and setClearValue().
|
private |
Definition at line 66 of file Renderer.hpp.
Referenced by createCommandBuffers(), and getCurrentCommandBuffer().
|
private |
Definition at line 70 of file Renderer.hpp.
Referenced by getCurrentCommandBuffer(), and getFrameIndex().
|
private |
Definition at line 69 of file Renderer.hpp.
|
private |
Definition at line 64 of file Renderer.hpp.
Referenced by createCommandBuffers().
|
private |
Definition at line 71 of file Renderer.hpp.
Referenced by isFrameInProgress().
|
private |
Definition at line 65 of file Renderer.hpp.
Referenced by getAspectRatio(), and getSwapChainRenderPass().
|
private |
Definition at line 63 of file Renderer.hpp.
Referenced by getWindow().