![]() |
Raven Engine v0.1
|
Static interface facade for all renderer operations. More...
#include <IllumineRenderer.h>
Static Public Member Functions | |
| static void | Init (Window &wnd, const RendererConfig &config) |
| Initialize the renderer with the given window and configuration. | |
| static void | Shutdown () |
| Clean up all renderer resources. | |
| static void | WaitRender () |
| static void | InitCommandBuffers () |
| Initialize command buffers for rendering. | |
| static void | BeginFrame () |
| Begin a new frame. | |
| static void | EndFrame () |
| End the current frame. | |
| static void | SetVSync (bool enabled) |
| Enable or disable vertical synchronization. | |
| static void | BeginRenderPass (const Ref< RenderPass > &renderPass, const Ref< RenderCommandBuffer > &commandBuffer) |
| Begin a render pass on the given command buffer. | |
| static void | EndRenderPass (const Ref< RenderCommandBuffer > &commandBuffer) |
| End the current render pass on the command buffer. | |
| static void | DrawGeometry (const Ref< RenderCommandBuffer > &commandBuffer, Ref< Pipeline > pipeline, Ref< VertexBuffer > vertexBuffer, Ref< IndexBuffer > indexBuffer, const Crux::mat4 &transform) |
| Record draw commands for arbitrary geometry. | |
| static void | DrawStaticMesh (const Ref< RenderCommandBuffer > &commandBuffer, const Ref< Pipeline > &pipeline, const Ref< Mesh > &mesh, const Crux::mat4 &transform) |
| Draw a static mesh. | |
| static Ref< RenderCommandBuffer > | GetCommandBuffer () |
| Get the current command buffer for recording rendering commands. | |
| static Ref< RenderCommandBuffer > | GetCommandBuffer (u8 index) |
| Get command buffer by index. | |
| static u32 | GetImageIndex () |
| Get the current swapchain image index. | |
| static void * | GetDescriptorPool () |
| Get the Vulkan descriptor pool pointer. | |
| static void * | GetInstance () |
| Get the Vulkan instance pointer. | |
| static void * | BeginSingleTimeCommand () |
| Begin recording a single-use command buffer. | |
| static void | EndSingleTimeCommand (void *commandBuffer) |
| End recording and submit a single-use command buffer. | |
| static void | TransitionImageLayout (void *image, ImageFormat format, ImageLayout oldLayout, ImageLayout newLayout, u32 mipCount=0) |
| Transition an image from one layout to another. | |
| static void | CopyBuffer (void *srcBuffer, void *dstBuffer, u32 size) |
| Copy data from one buffer to another. | |
| static void | CopyBufferToImage (void *srcBuffer, void *dstImage, u32 width, u32 height) |
| Copy buffer data to an image. | |
| static void | Submit (const StaticMeshSubmission &s) |
| Submit a static mesh for rendering. | |
| static const std::vector< StaticMeshSubmission > & | GetStaticMeshSubmissions () |
| Get the list of static mesh submissions queued for this frame. | |
| static Ref< ShaderLibrary > | GetShaderLibrary () |
| Get the shader library used by the renderer. | |
| static Ref< MaterialRegistry > | GetMaterialRegistry () |
| static RendererConfig & | GetConfig () |
| Get the current renderer configuration. | |
| static RendererData & | GetRenderData () |
| Get current runtime renderer data (stats, etc). | |
| static Window & | GetWindow () |
| Get the window associated with the renderer. | |
| static Swapchain & | GetSwapchain () |
| Get the swapchain currently used by the renderer. | |
| static bool | ShouldRecreate () |
| Check if the renderer requests swapchain recreation. | |
| static void | QueueRecreate () |
| Mark the swapchain for recreation. | |
| static void | Recreated () |
| Clear the swapchain recreation request flag. | |
| static void | RegisterShaderDependency (Shader *shader, Pipeline *pipeline) |
| Registers a pipeline to a shader for reloading. | |
| static void | RegisterPipelineDependency (Pipeline *pipeline, RenderPass *renderpass) |
| Registers a renderpass to a pipeline for reloading. | |
| static void | OnShaderReloaded (const Ref< Shader > &shader) |
| Queues up a shader for reload at the beginning of the next frame. | |
| static void | ProcessShaderReloadQueue () |
| Rebuilds pipelines and rebakes descriptors attached to the pipeline. | |
| static RendererAPI & | GetRendererAPI () |
| Access the underlying RendererAPI implementation. | |
Static interface facade for all renderer operations.
Delegates all rendering commands and resource management to the internal RendererAPI implementation. Provides frame lifecycle methods, command buffer handling, mesh submissions, and utility functions for image transitions and buffer copies.
|
static |
Begin a new frame.
Prepares the renderer and command buffers for issuing draw commands. Must be called at the start of every frame.
|
static |
Begin a render pass on the given command buffer.
| renderPass | The render pass object defining attachments and subpasses. |
| commandBuffer | Command buffer to record commands into. |
Prepares the GPU for rendering according to the specified render pass.
|
static |
Begin recording a single-use command buffer.
Used for short-lived GPU operations like buffer copies or layout transitions.
|
static |
Copy data from one buffer to another.
| srcBuffer | Source buffer pointer. |
| dstBuffer | Destination buffer pointer. |
| size | Size in bytes to copy. |
|
static |
Copy buffer data to an image.
| srcBuffer | Source buffer pointer. |
| dstImage | Destination image pointer. |
| width | Width of the target image. |
| height | Height of the target image. |
|
static |
Record draw commands for arbitrary geometry.
| commandBuffer | Command buffer to record draw calls. |
| pipeline | Pipeline to bind for rendering. |
| vertexBuffer | Vertex buffer containing geometry. |
| indexBuffer | Index buffer defining geometry topology. |
| transform | Model transform matrix. |
Issues draw commands for the given geometry with the specified transform.
|
static |
Draw a static mesh.
| commandBuffer | Command buffer to record draw calls. |
| pipeline | Pipeline to bind for rendering. |
| mesh | Static mesh to draw. |
| transform | Model transform matrix. |
Submits all vertex and index buffers associated with the static mesh.
|
static |
End the current frame.
Submits command buffers to the GPU and presents the swapchain image. Must be called after all draw calls for the frame are done.
|
static |
End the current render pass on the command buffer.
| commandBuffer | Command buffer to end the render pass on. |
Signals the GPU to finish rendering operations for this pass.
|
static |
End recording and submit a single-use command buffer.
| commandBuffer | Pointer to the command buffer to submit. |
|
static |
Get the current command buffer for recording rendering commands.
|
static |
Get command buffer by index.
| index | Index of the command buffer (typically frame index). |
|
static |
Get the current renderer configuration.
|
static |
Get the Vulkan descriptor pool pointer.
Exposes the descriptor pool for low-level descriptor management.
|
static |
Get the current swapchain image index.
|
static |
Get the Vulkan instance pointer.
|
static |
|
static |
Get current runtime renderer data (stats, etc).
|
inlinestatic |
Access the underlying RendererAPI implementation.
|
static |
Get the shader library used by the renderer.
|
static |
Get the list of static mesh submissions queued for this frame.
|
inlinestatic |
Get the swapchain currently used by the renderer.
|
inlinestatic |
Get the window associated with the renderer.
|
static |
Initialize the renderer with the given window and configuration.
| wnd | Reference to the window to render to. |
| config | Renderer configuration settings. |
Sets up the RendererAPI, swapchain, command buffers, and necessary resources. Must be called before any rendering commands.
|
static |
Initialize command buffers for rendering.
Prepares command buffers for use in the current frames in flight.
Queues up a shader for reload at the beginning of the next frame.
|
static |
Rebuilds pipelines and rebakes descriptors attached to the pipeline.
|
inlinestatic |
Mark the swapchain for recreation.
|
inlinestatic |
Clear the swapchain recreation request flag.
|
static |
Registers a renderpass to a pipeline for reloading.
|
static |
Registers a pipeline to a shader for reloading.
|
static |
Enable or disable vertical synchronization.
| enabled | True to enable VSync, false to disable. |
Updates swapchain and presentation settings accordingly.
|
inlinestatic |
Check if the renderer requests swapchain recreation.
|
static |
Clean up all renderer resources.
Releases all allocated GPU and CPU-side resources. Must be called before application shutdown.
|
static |
Submit a static mesh for rendering.
| s | Static mesh submission data. |
|
static |
Transition an image from one layout to another.
| image | Pointer to the Vulkan image. |
| format | Image format. |
| oldLayout | Current layout of the image. |
| newLayout | Target layout to transition to. |
| mipCount | Number of mipmap levels to transition (default 0 = all). |
|
static |