Vulkan implementation of the RendererAPI interface. More...
#include <VulkanRenderer.h>
Inherits Raven::RendererAPI.
Public Member Functions | |
| ILLUMINE_API void | Init (Window &wnd) override |
| Initializes the VulkanRenderer with a reference to the application window. Creates Vulkan instance, device, surface, and prepares rendering resources. | |
| ILLUMINE_API void | Shutdown () override |
| Cleans up all Vulkan resources and shuts down the renderer. | |
| ILLUMINE_API void | InitCommandBuffers () override |
| Allocates and initializes Vulkan command buffers for rendering. | |
| ILLUMINE_API void | CreateDescriptorPool () |
| Creates the Vulkan descriptor pool used for descriptor set allocations. | |
| ILLUMINE_API void | BeginFrame () override |
| Begins the frame by acquiring the next swapchain image and preparing command buffers. | |
| ILLUMINE_API void | EndFrame () override |
| Ends the frame, submitting command buffers and presenting the swapchain image. | |
| ILLUMINE_API void | BeginRenderPass (Ref< RenderPass > renderPass) override |
| Begins a render pass by recording commands into the provided command buffer. | |
| ILLUMINE_API void | DrawGeometry (Ref< Pipeline > pipeline, Ref< VertexBuffer > vertexBuffer, Ref< IndexBuffer > indexBuffer, const Crux::mat4 &transform) override |
| Issues a draw call for geometry with vertex and index buffers. | |
| ILLUMINE_API void | DrawGeometryIndexed (Ref< VertexBuffer > vb, Ref< IndexBuffer > ib, u32 indexCount) override |
| ILLUMINE_API void | DrawGeometryRaw (Ref< VertexBuffer > vb, u32 vertexCount) override |
| ILLUMINE_API void | DrawFullscreenQuad (Ref< Pipeline > pipeline, Ref< VertexBuffer > vb, Ref< IndexBuffer > ib) override |
| ILLUMINE_API void | DrawStaticMesh (Ref< Pipeline > pipeline, Ref< Mesh > mesh, const Crux::mat4 &transform, const Crux::Frustum &frustum) override |
| Issues a draw call for a static mesh. | |
| ILLUMINE_API void | DrawStaticMeshDepthOnly (Ref< Pipeline > pipeline, Ref< Mesh > mesh, const Crux::mat4 &transform, const Crux::Frustum &frustum) override |
| ILLUMINE_API void | DrawSkybox (Ref< Pipeline > pipeline, Ref< VertexBuffer > vb) override |
| ILLUMINE_API void | EndRenderPass () override |
| Ends the currently active render pass. | |
| Ref< RenderCommandBuffer > | GetCommandBuffer () const override |
| Gets the primary command buffer for the current frame. | |
| Ref< RenderCommandBuffer > | GetCommandBuffer (u8 index) const override |
| Gets a command buffer by index (for multi-buffering). | |
| u32 | GetImageIndex () const override |
| Gets the current swapchain image index. | |
| void * | GetDescriptorPool () const override |
| Gets the Vulkan descriptor pool handle. | |
| ILLUMINE_API void * | BeginSingleTimeCommand () override |
| Begins recording a single-use command buffer for immediate commands. | |
| ILLUMINE_API void | EndSingleTimeCommand (void *commandBuffer) override |
| Ends recording of a single-use command buffer and submits it. | |
| ILLUMINE_API void | BeginGPUPerf (const std::string &name) override |
| ILLUMINE_API void | EndGPUPerf () override |
| ILLUMINE_API std::vector< GPUTimeSpan > | GetGPUTimes () override |
| ILLUMINE_API void | CopyBuffer (void *srcBuffer, void *dstBuffer, u32 size) override |
| Copies data from a source buffer to a destination buffer. | |
| ILLUMINE_API void | CopyBufferToImage (void *srcBuffer, void *dstImage, u32 width, u32 height) override |
| Copies buffer data into an image (texture). | |
| ILLUMINE_API void | TransitionImage (Ref< Image2D > image, ResourceState newState) override |
| ILLUMINE_API void | TransitionImageLayout (Ref< Image2D > image, ImageFormat format, ImageLayout oldLayout, ImageLayout newLayout, u32 mipCount) override |
| Transitions an image layout between usage states (e.g. undefined to shader read). | |
| ILLUMINE_API void | FullBarrier () override |
| ILLUMINE_API void | StorageWriteToComputeRead () override |
| ILLUMINE_API void | StorageWriteToFragmentRead () override |
| ILLUMINE_API void | DepthWriteToComputeRead () override |
| ILLUMINE_API void | ComputeReadToDepthWrite () override |
| ILLUMINE_API void | Submit (const StaticMeshSubmission &submission) override |
| Submits a static mesh to be rendered during the current frame. | |
| const std::vector< StaticMeshSubmission > & | GetStaticMeshSubmissions () const override |
| Gets all static mesh submissions queued for the current frame. | |
| void * | GetInstance () const override |
| Gets the raw Vulkan instance handle. | |
| Window & | GetWindow () const override |
| Gets the window reference the renderer is rendering to. | |
| Public Member Functions inherited from Raven::RendererAPI | |
| virtual | ~RendererAPI ()=default |
| Public Member Functions inherited from Raven::RefCounted | |
| RefCounted () | |
| virtual | ~RefCounted () |
| void | IncRefCount () |
| void | DecRefCount () |
| u32 | GetRefCount () const |
Additional Inherited Members | |
| Public Types inherited from Raven::RendererAPI | |
| enum class | API : u8 { None = 0 , Vulkan = 1 } |
| Supported rendering backends. More... | |
| Static Public Member Functions inherited from Raven::RendererAPI | |
| static API | GetAPI () |
| Returns the current rendering API in use. | |
| static Ref< RendererAPI > | Create () |
| Factory method to create the renderer API instance for the selected backend. | |
| static std::string_view | APIToString () |
| Converts the API enum to a string representation. | |
| Static Public Attributes inherited from Raven::RendererAPI | |
| static float | m_ElapsedTime = 0.0f |
| Elapsed time tracker for rendering, to be improved with GPU timers. | |
Vulkan implementation of the RendererAPI interface.
Responsible for managing Vulkan instance, device, swapchain, command buffers, descriptor pools, and rendering submissions.
|
overridevirtual |
Begins the frame by acquiring the next swapchain image and preparing command buffers.
Implements Raven::RendererAPI.
|
overridevirtual |
Implements Raven::RendererAPI.
|
overridevirtual |
Begins a render pass by recording commands into the provided command buffer.
| renderPass | The render pass to begin. |
| commandBuffer | The command buffer to record commands into. |
Implements Raven::RendererAPI.
|
overridevirtual |
Begins recording a single-use command buffer for immediate commands.
Implements Raven::RendererAPI.
|
overridevirtual |
Implements Raven::RendererAPI.
|
overridevirtual |
Copies data from a source buffer to a destination buffer.
| srcBuffer | Source Vulkan buffer pointer. |
| dstBuffer | Destination Vulkan buffer pointer. |
| size | Number of bytes to copy. |
Implements Raven::RendererAPI.
|
overridevirtual |
Copies buffer data into an image (texture).
| srcBuffer | Source Vulkan buffer pointer. |
| dstImage | Destination Vulkan image pointer. |
| width | Width of the image. |
| height | Height of the image. |
Implements Raven::RendererAPI.
| void Raven::VulkanRenderer::CreateDescriptorPool | ( | ) |
Creates the Vulkan descriptor pool used for descriptor set allocations.
|
overridevirtual |
Implements Raven::RendererAPI.
|
overridevirtual |
Implements Raven::RendererAPI.
|
overridevirtual |
Issues a draw call for geometry with vertex and index buffers.
| commandBuffer | The command buffer to record into. |
| pipeline | The graphics pipeline to use. |
| vertexBuffer | The vertex buffer containing geometry vertices. |
| indexBuffer | The index buffer for indexed drawing. |
| transform | Transformation matrix applied to the geometry. |
Implements Raven::RendererAPI.
|
overridevirtual |
Implements Raven::RendererAPI.
|
overridevirtual |
Implements Raven::RendererAPI.
|
overridevirtual |
Implements Raven::RendererAPI.
|
overridevirtual |
Issues a draw call for a static mesh.
| commandBuffer | The command buffer to record into. |
| pipeline | The graphics pipeline to use. |
| mesh | The static mesh to draw. |
| transform | Transformation matrix applied to the mesh. |
Implements Raven::RendererAPI.
|
overridevirtual |
Implements Raven::RendererAPI.
|
overridevirtual |
Ends the frame, submitting command buffers and presenting the swapchain image.
Implements Raven::RendererAPI.
|
overridevirtual |
Implements Raven::RendererAPI.
|
overridevirtual |
Ends the currently active render pass.
| commandBuffer | The command buffer being recorded. |
Implements Raven::RendererAPI.
|
overridevirtual |
Ends recording of a single-use command buffer and submits it.
| commandBuffer | Raw pointer to the Vulkan command buffer. |
Implements Raven::RendererAPI.
|
overridevirtual |
Implements Raven::RendererAPI.
|
inlineoverridevirtual |
Gets the primary command buffer for the current frame.
Implements Raven::RendererAPI.
|
inlineoverridevirtual |
Gets a command buffer by index (for multi-buffering).
| index | Index of the command buffer. |
Implements Raven::RendererAPI.
|
inlineoverridevirtual |
Gets the Vulkan descriptor pool handle.
Implements Raven::RendererAPI.
|
overridevirtual |
Implements Raven::RendererAPI.
|
inlineoverridevirtual |
Gets the current swapchain image index.
Implements Raven::RendererAPI.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Gets all static mesh submissions queued for the current frame.
Implements Raven::RendererAPI.
|
inlineoverridevirtual |
Gets the window reference the renderer is rendering to.
Implements Raven::RendererAPI.
|
overridevirtual |
Initializes the VulkanRenderer with a reference to the application window. Creates Vulkan instance, device, surface, and prepares rendering resources.
| wnd | The window to render into. |
Implements Raven::RendererAPI.
|
overridevirtual |
Allocates and initializes Vulkan command buffers for rendering.
Implements Raven::RendererAPI.
|
overridevirtual |
Cleans up all Vulkan resources and shuts down the renderer.
Implements Raven::RendererAPI.
|
overridevirtual |
Implements Raven::RendererAPI.
|
overridevirtual |
Implements Raven::RendererAPI.
|
overridevirtual |
Submits a static mesh to be rendered during the current frame.
| submission | The mesh submission data. |
Implements Raven::RendererAPI.
|
overridevirtual |
Implements Raven::RendererAPI.
|
overridevirtual |
Transitions an image layout between usage states (e.g. undefined to shader read).
| image | Image ref. |
| format | Image format. |
| oldLayout | Current image layout. |
| newLayout | Desired image layout. |
| mipCount | Number of mip levels. |
Implements Raven::RendererAPI.