SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::RenderEngine::VulkanRenderer Class Reference

#include <VulkanRenderer.hpp>

Inheritance diagram for Sleak::RenderEngine::VulkanRenderer:

Public Member Functions

 VulkanRenderer (Window *window)
 ~VulkanRenderer ()
 Calls Cleanup() to tear down all Vulkan resources.
void ApplyMSAAChange () override
void ApplyShadowResolutionChange () override
 Recreates the extent-dependent shadow map objects at the queued resolution.
void ApplyVSyncChange () override
 Recreates the swapchain to apply a queued VSync toggle.
virtual void BeginCustomFormatPass (VertexFormatHandle format) override
 Binds the custom-format pipeline matching the currently active render pass.
virtual void BeginDebugLinePass () override
 Binds the debug line pipeline for the current frame.
virtual void BeginForwardTransparentPass () override
 Begins the forward transparent render pass over the HDR scene image.
virtual void BeginRender () override
virtual void BeginShadowPass () override
 Marks the shadow pass active and invalidates the push constant cache.
virtual void BeginSkinnedPass () override
 Binds the skinned pipeline matching the currently active render pass.
virtual void BeginSkyboxPass () override
 Binds the skybox pipeline and its descriptor set for the current frame.
virtual void BindBoneBuffer (RefPtr< BufferBase > buffer) override
 Copies bone matrices into the current frame's UBO and binds its descriptor set.
virtual void BindConstantBuffer (RefPtr< BufferBase > buffer, uint32_t slot=0) override
virtual void BindGBufferShader () override
virtual void BindIndexBuffer (RefPtr< BufferBase > buffer, uint32_t slot=0) override
 Binds a 32-bit index buffer.
virtual void BindPBRMaterial (Sleak::Material *material) override
 Writes a material's textures and params into its ring slot and binds it at set 0.
virtual void BindTexture (RefPtr< Sleak::Texture > texture, uint32_t slot=0) override
 Binds a texture's descriptor set at slot 0, skipping cubemaps and the GBuffer geometry pass.
virtual void BindTextureRaw (Sleak::Texture *texture, uint32_t slot=0) override
 Raw-pointer variant of BindTexture.
virtual void BindVertexBuffer (RefPtr< BufferBase > buffer, uint32_t slot=0) override
virtual void Cleanup () override
 Tears down every Vulkan resource in reverse dependency order.
virtual void ClearDepthStencil (bool clearDepth, bool clearStencil, float depth, uint8_t stencil) override
 No-op; depth/stencil clears are driven by the render pass clear values.
virtual void ClearRenderTarget (float r, float g, float b, float a) override
 Stores the clear color used by the next BeginRender.
virtual BufferBaseCreateBuffer (BufferType Type, uint32_t size, void *data) override
 Allocates and initializes a VulkanBuffer.
TextureCreateCubemapTexture (const std::array< std::string, 6 > &facePaths)
 Loads a cubemap from six face images and writes it into the skybox descriptor sets.
TextureCreateCubemapTextureFromPanorama (const std::string &panoramaPath)
 Loads an equirectangular panorama as a cubemap and writes it into the skybox descriptor sets.
virtual bool CreateImGUI () override
 Initializes ImGui and its Vulkan backend against the active render pass.
virtual ShaderCreateShader (const std::string &shaderSource) override
 Compiles a VulkanShader from source.
virtual TextureCreateTexture (const std::string &TexturePath) override
 Loads a texture from disk and writes its descriptor sets.
virtual TextureCreateTextureFromData (uint32_t width, uint32_t height, void *data) override
 Loads a texture from an in-memory RGBA8 buffer.
virtual void Draw (uint32_t vertexCount) override
 Issues a non-indexed draw call and updates the vertex/triangle counters.
virtual void DrawIndexed (uint32_t indexCount) override
 Issues an indexed draw call and updates the vertex/triangle counters.
virtual void DrawIndexedInstance (uint32_t instanceCount, uint32_t indexPerInstance) override
 Issues an instanced, indexed draw call.
virtual void DrawInstance (uint32_t instanceCount, uint32_t vertexPerInstance) override
 Issues an instanced, non-indexed draw call.
virtual void EndCustomFormatPass () override
 Restores the previous pipeline and descriptor set after custom-format draws.
virtual void EndDebugLinePass () override
 Restores the previous pipeline and descriptor set after debug line draws.
virtual void EndForwardTransparentPass () override
 Marks the forward transparent pass ended; EndRender closes the actual render pass.
virtual void EndRender () override
 Ends the active render pass, submits the command buffer, and presents.
virtual void EndShadowPass () override
 Marks the shadow pass inactive.
virtual void EndSkinnedPass () override
 Restores the previous pipeline after skinned draws.
virtual void EndSkyboxPass () override
 Restores the previous pipeline and descriptor set after the skybox draw.
virtual void ExecuteDeferredLightingPass () override
 Runs the deferred lighting pass, reading the GBuffer and writing the HDR scene image.
virtual void FlushPendingTransfers () override
 Kicks off the current frame's async buffer upload batch.
virtual RenderContextGetContext () override
 Returns the backend's command-recording interface.
virtual uint32_t GetFeatureCaps () const override
 Feature capability mask; backends override with the audited truth.
virtual size_t GetGPUMemoryBudget () const override
 Returns the device-local heap size reported by the allocator.
virtual size_t GetGPUMemoryUsed () const override
 Returns total bytes currently allocated by VulkanBuffer.
bool GetRender ()
virtual bool Initialize () override
virtual bool IsDeferredEnabled () const override
virtual bool IsInGeometryPass () const override
virtual bool IsShadowPassActive () const override
virtual void Resize (uint32_t width, uint32_t height) override
 Recreates the swapchain for the new window dimensions.
void SetLightVP (const float *lightVP) override
 Stages the light view-projection matrix for commit at the next BeginRender.
void SetRender (bool value)
virtual void SetRenderFace (RenderFace face) override
 Stores the cull face for the next pipeline rebuild (Vulkan state is baked).
virtual void SetRenderMode (RenderMode mode) override
 Stores the polygon mode for the next pipeline rebuild (Vulkan state is baked).
virtual void SetViewport (float x, float y, float width, float height, float minDepth=0.0f, float maxDepth=1.0f) override
 Sets the dynamic viewport on the active command buffer.
virtual void UpdateDeferredCB (const void *data, uint32_t size) override
 Copies deferred CB data into the current frame's UBO and snapshots the camera matrices.
void UpdateShadowLightUBO (const void *data, uint32_t size) override
 Copies light and shadow data into the current frame's mapped UBO.
virtual void WaitIdle () override
 Blocks until the device finishes all submitted GPU work.
Public Member Functions inherited from Sleak::RenderEngine::Renderer
virtual ~Renderer ()=0
float GetCPUUsage () const
bool GetDeferredEnabled () const
float GetExposure () const
int GetFrameRate () const
float GetFrameTime () const
float GetGamma () const
float GetIBLIntensity () const
bool GetImGUIEnabled ()
bool GetIsPerformanceCounter ()
uint32_t GetMaxMSAASampleCount () const
uint32_t GetMSAASampleCount () const
float GetRamUsage () const
RenderMode GetRenderMode () const
uint32_t GetShadowMapResolution () const
float GetSSAOBias () const
float GetSSAOPower () const
float GetSSAORadius () const
int GetTriangles () const
RendererType GetType () const
const char * GetTypeStr () const
int GetVertices () const
bool GetVSync () const
bool IsBloomEnabled () const
bool IsIBLEnabled () const
bool IsPCSSEnabled () const
bool IsShadowPassEnabled () const
bool IsSSAOEnabled () const
bool IsSSREnabled () const
bool IsTAAEnabled () const
bool IsTonemappingEnabled () const
void SetBloomEnabled (bool enabled)
void SetDeferredEnabled (bool enabled)
void SetExposure (float exposure)
void SetGamma (float gamma)
void SetIBLEnabled (bool enabled)
void SetIBLIntensity (float intensity)
void SetImGUI (bool bEnable)
virtual void SetMSAASampleCount (uint32_t samples)
 Requests a new MSAA sample count; rejects invalid values and samples above 1 while deferred shading is on.
void SetPCSSEnabled (bool enabled)
void SetPerformanceCounter (bool value)
void SetRenderCullFace (RenderFace face)
void SetRenderDrawMode (RenderMode mode)
void SetShadowMapResolution (uint32_t res)
 Requests a new shadow map size, clamped to [256, 8192] and queued if resources already exist.
void SetShadowPassEnabled (bool enabled)
void SetSSAOBias (float bias)
void SetSSAOEnabled (bool enabled)
void SetSSAOPower (float power)
void SetSSAORadius (float radius)
void SetSSREnabled (bool enabled)
void SetTAAEnabled (bool enabled)
void SetTonemappingEnabled (bool enabled)
virtual void SetVSync (bool enabled)
Public Member Functions inherited from Sleak::RenderEngine::RenderContext
virtual void SetCullEnabled (bool enabled)
virtual void SetDepthCompare (DepthCompare compare)
virtual void SetDepthWrite (bool enabled)

Additional Inherited Members

Protected Member Functions inherited from Sleak::RenderEngine::Renderer
void UpdateFrameMetrics ()
 Rolls up frame count into rate/time/triangle stats once per MetricUpdateInterval.
Protected Attributes inherited from Sleak::RenderEngine::Renderer
bool bEnabledPerformanceCounter = false
bool bImFrameActive = false
bool bImInitialized = false
int DisplayTriangles = 0
int DisplayVertices = 0
int DrawnTriangles = 0
int DrawnVertices = 0
RenderFace Face
int frameRate = 0
float frameTime = 0
bool m_bloomEnabled = true
bool m_deferredEnabled = true
float m_exposure = 1.0f
uint32_t m_frameCount = 0
Timer m_frameTimer
float m_gamma = 2.2f
bool m_iblEnabled = false
float m_iblIntensity = 0.5f
uint32_t m_maxMsaaSampleCount = 1
bool m_msaaChangeRequested = false
uint32_t m_msaaSampleCount = 1
bool m_pcssEnabled = true
uint32_t m_pendingMsaaSampleCount = 1
uint32_t m_pendingShadowMapResolution = 2048
uint32_t m_shadowMapResolution = 2048
bool m_shadowPassEnabled = false
bool m_shadowResChangeRequested = false
bool m_shadowResourcesCreated = false
float m_ssaoBias = 0.025f
bool m_ssaoEnabled = false
float m_ssaoPower = 2.0f
float m_ssaoRadius = 0.8f
bool m_ssrEnabled = false
bool m_taaEnabled = false
bool m_tonemapEnabled = false
bool m_vsync = false
bool m_vsyncChangeRequested = false
RenderMode Mode
RendererType Type
float UsedCPU = 0
float UsedRam = 0
Static Protected Attributes inherited from Sleak::RenderEngine::Renderer
static constexpr float MetricUpdateInterval = 0.5f

Detailed Description

Vulkan backend for Renderer/RenderContext: owns the device, swapchain, and per-frame command recording. Implementation spans this file plus the Vulkan* subsystem TUs (Device, Swapchain, Pipelines, Shadow, etc.).

Definition at line 49 of file VulkanRenderer.hpp.

Constructor & Destructor Documentation

◆ VulkanRenderer()

Sleak::RenderEngine::VulkanRenderer::VulkanRenderer ( Window * window)

Constructs the renderer, sets the clear color, and registers ResourceManager factory callbacks.

Definition at line 44 of file VulkanRenderer.cpp.

◆ ~VulkanRenderer()

Sleak::RenderEngine::VulkanRenderer::~VulkanRenderer ( )

Calls Cleanup() to tear down all Vulkan resources.

Definition at line 74 of file VulkanRenderer.cpp.

Member Function Documentation

◆ ApplyMSAAChange()

void Sleak::RenderEngine::VulkanRenderer::ApplyMSAAChange ( )
overridevirtual

Rebuilds the swapchain-dependent pipelines and render pass for a queued MSAA sample count change.

Reimplemented from Sleak::RenderEngine::Renderer.

Definition at line 1318 of file VulkanRenderer.cpp.

◆ ApplyShadowResolutionChange()

void Sleak::RenderEngine::VulkanRenderer::ApplyShadowResolutionChange ( )
overridevirtual

Recreates the extent-dependent shadow map objects at the queued resolution.

Recreates the extent-dependent shadow map objects (image, view, framebuffer) at the queued resolution. Keep in sync with CreateShadowResources; samplers, render pass, and pipeline are extent-independent.

Reimplemented from Sleak::RenderEngine::Renderer.

Definition at line 1500 of file VulkanRenderer.cpp.

◆ ApplyVSyncChange()

void Sleak::RenderEngine::VulkanRenderer::ApplyVSyncChange ( )
overridevirtual

Recreates the swapchain to apply a queued VSync toggle.

Reimplemented from Sleak::RenderEngine::Renderer.

Definition at line 1421 of file VulkanRenderer.cpp.

◆ BeginCustomFormatPass()

void Sleak::RenderEngine::VulkanRenderer::BeginCustomFormatPass ( VertexFormatHandle format)
overridevirtual

Binds the custom-format pipeline matching the currently active render pass.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 1178 of file VulkanPipelines.cpp.

◆ BeginDebugLinePass()

void Sleak::RenderEngine::VulkanRenderer::BeginDebugLinePass ( )
overridevirtual

Binds the debug line pipeline for the current frame.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 1260 of file VulkanPipelines.cpp.

◆ BeginForwardTransparentPass()

void Sleak::RenderEngine::VulkanRenderer::BeginForwardTransparentPass ( )
overridevirtual

Begins the forward transparent render pass over the HDR scene image.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 1219 of file VulkanDeferred.cpp.

◆ BeginRender()

void Sleak::RenderEngine::VulkanRenderer::BeginRender ( )
overridevirtual

Prepares the command buffer and begins the shadow/GBuffer/forward render pass; drawing happens via the RenderContext methods below.

Prepares the command buffer and begins the shadow/GBuffer/forward render pass. Does not end the command buffer; the RenderCommandQueue records draw commands via the RenderContext interface after this returns.

Implements Sleak::RenderEngine::Renderer.

Definition at line 164 of file VulkanRenderer.cpp.

◆ BeginShadowPass()

void Sleak::RenderEngine::VulkanRenderer::BeginShadowPass ( )
overridevirtual

Marks the shadow pass active and invalidates the push constant cache.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 591 of file VulkanShadow.cpp.

◆ BeginSkinnedPass()

void Sleak::RenderEngine::VulkanRenderer::BeginSkinnedPass ( )
overridevirtual

Binds the skinned pipeline matching the currently active render pass.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 1458 of file VulkanPipelines.cpp.

◆ BeginSkyboxPass()

void Sleak::RenderEngine::VulkanRenderer::BeginSkyboxPass ( )
overridevirtual

Binds the skybox pipeline and its descriptor set for the current frame.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 14 of file VulkanPipelines.cpp.

◆ BindBoneBuffer()

void Sleak::RenderEngine::VulkanRenderer::BindBoneBuffer ( RefPtr< BufferBase > buffer)
overridevirtual

Copies bone matrices into the current frame's UBO and binds its descriptor set.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 432 of file VulkanDescriptors.cpp.

◆ BindConstantBuffer()

void Sleak::RenderEngine::VulkanRenderer::BindConstantBuffer ( RefPtr< BufferBase > buffer,
uint32_t slot = 0 )
overridevirtual

Pushes constant-buffer data via push constants, applying TAA jitter or the shadow push-constant cache as needed.

Implements Sleak::RenderEngine::RenderContext.

Definition at line 711 of file VulkanRenderer.cpp.

◆ BindGBufferShader()

void Sleak::RenderEngine::VulkanRenderer::BindGBufferShader ( )
overridevirtual

Binds the GBuffer pipeline and marks the geometry pass active. Called by RenderCommandQueue when deferred is active.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 1118 of file VulkanDeferred.cpp.

◆ BindIndexBuffer()

void Sleak::RenderEngine::VulkanRenderer::BindIndexBuffer ( RefPtr< BufferBase > buffer,
uint32_t slot = 0 )
overridevirtual

Binds a 32-bit index buffer.

Implements Sleak::RenderEngine::RenderContext.

Definition at line 700 of file VulkanRenderer.cpp.

◆ BindPBRMaterial()

void Sleak::RenderEngine::VulkanRenderer::BindPBRMaterial ( Sleak::Material * material)
overridevirtual

Writes a material's textures and params into its ring slot and binds it at set 0.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 592 of file VulkanDescriptors.cpp.

◆ BindTexture()

void Sleak::RenderEngine::VulkanRenderer::BindTexture ( RefPtr< Sleak::Texture > texture,
uint32_t slot = 0 )
overridevirtual

Binds a texture's descriptor set at slot 0, skipping cubemaps and the GBuffer geometry pass.

Binds a texture's descriptor set at slot 0, skipping cubemaps and the GBuffer geometry pass.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 928 of file VulkanRenderer.cpp.

◆ BindTextureRaw()

void Sleak::RenderEngine::VulkanRenderer::BindTextureRaw ( Sleak::Texture * texture,
uint32_t slot = 0 )
overridevirtual

Raw-pointer variant of BindTexture.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 958 of file VulkanRenderer.cpp.

◆ BindVertexBuffer()

void Sleak::RenderEngine::VulkanRenderer::BindVertexBuffer ( RefPtr< BufferBase > buffer,
uint32_t slot = 0 )
overridevirtual

Binds a vertex buffer slot, switching to the pipeline built for the buffer's registered vertex format.

Binds a vertex buffer slot, switching to the pipeline that matches the buffer's registered vertex format.

Implements Sleak::RenderEngine::RenderContext.

Definition at line 681 of file VulkanRenderer.cpp.

◆ Cleanup()

void Sleak::RenderEngine::VulkanRenderer::Cleanup ( )
overridevirtual

Tears down every Vulkan resource in reverse dependency order.

Implements Sleak::RenderEngine::Renderer.

Definition at line 1025 of file VulkanRenderer.cpp.

◆ ClearDepthStencil()

void Sleak::RenderEngine::VulkanRenderer::ClearDepthStencil ( bool clearDepth,
bool clearStencil,
float depth,
uint8_t stencil )
overridevirtual

No-op; depth/stencil clears are driven by the render pass clear values.

Implements Sleak::RenderEngine::RenderContext.

Definition at line 674 of file VulkanRenderer.cpp.

◆ ClearRenderTarget()

void Sleak::RenderEngine::VulkanRenderer::ClearRenderTarget ( float r,
float g,
float b,
float a )
overridevirtual

Stores the clear color used by the next BeginRender.

Implements Sleak::RenderEngine::RenderContext.

Definition at line 668 of file VulkanRenderer.cpp.

◆ CreateBuffer()

BufferBase * Sleak::RenderEngine::VulkanRenderer::CreateBuffer ( BufferType Type,
uint32_t size,
void * data )
overridevirtual

Allocates and initializes a VulkanBuffer.

Implements Sleak::RenderEngine::RenderContext.

Definition at line 783 of file VulkanRenderer.cpp.

◆ CreateCubemapTexture()

Sleak::Texture * Sleak::RenderEngine::VulkanRenderer::CreateCubemapTexture ( const std::array< std::string, 6 > & facePaths)

Loads a cubemap from six face images and writes it into the skybox descriptor sets.

Loads a cubemap from six face images and writes it into the skybox descriptor sets.

Definition at line 831 of file VulkanRenderer.cpp.

◆ CreateCubemapTextureFromPanorama()

Sleak::Texture * Sleak::RenderEngine::VulkanRenderer::CreateCubemapTextureFromPanorama ( const std::string & panoramaPath)

Loads an equirectangular panorama as a cubemap and writes it into the skybox descriptor sets.

Loads an equirectangular panorama as a cubemap and writes it into the skybox descriptor sets.

Definition at line 879 of file VulkanRenderer.cpp.

◆ CreateImGUI()

bool Sleak::RenderEngine::VulkanRenderer::CreateImGUI ( )
overridevirtual

Initializes ImGui and its Vulkan backend against the active render pass.

Implements Sleak::RenderEngine::Renderer.

Definition at line 236 of file VulkanDescriptors.cpp.

◆ CreateShader()

Shader * Sleak::RenderEngine::VulkanRenderer::CreateShader ( const std::string & shaderSource)
overridevirtual

Compiles a VulkanShader from source.

Implements Sleak::RenderEngine::RenderContext.

Definition at line 795 of file VulkanRenderer.cpp.

◆ CreateTexture()

Sleak::Texture * Sleak::RenderEngine::VulkanRenderer::CreateTexture ( const std::string & TexturePath)
overridevirtual

Loads a texture from disk and writes its descriptor sets.

Implements Sleak::RenderEngine::RenderContext.

Definition at line 805 of file VulkanRenderer.cpp.

◆ CreateTextureFromData()

Sleak::Texture * Sleak::RenderEngine::VulkanRenderer::CreateTextureFromData ( uint32_t width,
uint32_t height,
void * data )
overridevirtual

Loads a texture from an in-memory RGBA8 buffer.

Implements Sleak::RenderEngine::RenderContext.

Definition at line 817 of file VulkanRenderer.cpp.

◆ Draw()

void Sleak::RenderEngine::VulkanRenderer::Draw ( uint32_t vertexCount)
overridevirtual

Issues a non-indexed draw call and updates the vertex/triangle counters.

Implements Sleak::RenderEngine::RenderContext.

Definition at line 602 of file VulkanRenderer.cpp.

◆ DrawIndexed()

void Sleak::RenderEngine::VulkanRenderer::DrawIndexed ( uint32_t indexCount)
overridevirtual

Issues an indexed draw call and updates the vertex/triangle counters.

Implements Sleak::RenderEngine::RenderContext.

Definition at line 613 of file VulkanRenderer.cpp.

◆ DrawIndexedInstance()

void Sleak::RenderEngine::VulkanRenderer::DrawIndexedInstance ( uint32_t instanceCount,
uint32_t indexPerInstance )
overridevirtual

Issues an instanced, indexed draw call.

Implements Sleak::RenderEngine::RenderContext.

Definition at line 632 of file VulkanRenderer.cpp.

◆ DrawInstance()

void Sleak::RenderEngine::VulkanRenderer::DrawInstance ( uint32_t instanceCount,
uint32_t vertexPerInstance )
overridevirtual

Issues an instanced, non-indexed draw call.

Implements Sleak::RenderEngine::RenderContext.

Definition at line 624 of file VulkanRenderer.cpp.

◆ EndCustomFormatPass()

void Sleak::RenderEngine::VulkanRenderer::EndCustomFormatPass ( )
overridevirtual

Restores the previous pipeline and descriptor set after custom-format draws.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 1214 of file VulkanPipelines.cpp.

◆ EndDebugLinePass()

void Sleak::RenderEngine::VulkanRenderer::EndDebugLinePass ( )
overridevirtual

Restores the previous pipeline and descriptor set after debug line draws.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 1272 of file VulkanPipelines.cpp.

◆ EndForwardTransparentPass()

void Sleak::RenderEngine::VulkanRenderer::EndForwardTransparentPass ( )
overridevirtual

Marks the forward transparent pass ended; EndRender closes the actual render pass.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 1276 of file VulkanDeferred.cpp.

◆ EndRender()

void Sleak::RenderEngine::VulkanRenderer::EndRender ( )
overridevirtual

Ends the active render pass, submits the command buffer, and presents.

Implements Sleak::RenderEngine::Renderer.

Definition at line 463 of file VulkanRenderer.cpp.

◆ EndShadowPass()

void Sleak::RenderEngine::VulkanRenderer::EndShadowPass ( )
overridevirtual

Marks the shadow pass inactive.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 597 of file VulkanShadow.cpp.

◆ EndSkinnedPass()

void Sleak::RenderEngine::VulkanRenderer::EndSkinnedPass ( )
overridevirtual

Restores the previous pipeline after skinned draws.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 1480 of file VulkanPipelines.cpp.

◆ EndSkyboxPass()

void Sleak::RenderEngine::VulkanRenderer::EndSkyboxPass ( )
overridevirtual

Restores the previous pipeline and descriptor set after the skybox draw.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 35 of file VulkanPipelines.cpp.

◆ ExecuteDeferredLightingPass()

void Sleak::RenderEngine::VulkanRenderer::ExecuteDeferredLightingPass ( )
overridevirtual

Runs the deferred lighting pass, reading the GBuffer and writing the HDR scene image.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 1129 of file VulkanDeferred.cpp.

◆ FlushPendingTransfers()

void Sleak::RenderEngine::VulkanRenderer::FlushPendingTransfers ( )
overridevirtual

Kicks off the current frame's async buffer upload batch.

Reimplemented from Sleak::RenderEngine::Renderer.

Definition at line 1009 of file VulkanRenderer.cpp.

◆ GetContext()

virtual RenderContext * Sleak::RenderEngine::VulkanRenderer::GetContext ( )
inlineoverridevirtual

Returns the backend's command-recording interface.

Implements Sleak::RenderEngine::Renderer.

Definition at line 87 of file VulkanRenderer.hpp.

◆ GetFeatureCaps()

virtual uint32_t Sleak::RenderEngine::VulkanRenderer::GetFeatureCaps ( ) const
inlineoverridevirtual

Feature capability mask; backends override with the audited truth.

Reimplemented from Sleak::RenderEngine::Renderer.

Definition at line 90 of file VulkanRenderer.hpp.

◆ GetGPUMemoryBudget()

size_t Sleak::RenderEngine::VulkanRenderer::GetGPUMemoryBudget ( ) const
overridevirtual

Returns the device-local heap size reported by the allocator.

Reimplemented from Sleak::RenderEngine::Renderer.

Definition at line 1020 of file VulkanRenderer.cpp.

◆ GetGPUMemoryUsed()

size_t Sleak::RenderEngine::VulkanRenderer::GetGPUMemoryUsed ( ) const
overridevirtual

Returns total bytes currently allocated by VulkanBuffer.

Reimplemented from Sleak::RenderEngine::Renderer.

Definition at line 1015 of file VulkanRenderer.cpp.

◆ GetRender()

bool Sleak::RenderEngine::VulkanRenderer::GetRender ( )
inline

Definition at line 82 of file VulkanRenderer.hpp.

◆ Initialize()

bool Sleak::RenderEngine::VulkanRenderer::Initialize ( )
overridevirtual

Runs the full Vulkan bring-up sequence: instance, device, swapchain, pipelines, and sync objects.

Implements Sleak::RenderEngine::Renderer.

Definition at line 80 of file VulkanRenderer.cpp.

◆ IsDeferredEnabled()

virtual bool Sleak::RenderEngine::VulkanRenderer::IsDeferredEnabled ( ) const
inlineoverridevirtual

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 187 of file VulkanRenderer.hpp.

◆ IsInGeometryPass()

virtual bool Sleak::RenderEngine::VulkanRenderer::IsInGeometryPass ( ) const
inlineoverridevirtual

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 188 of file VulkanRenderer.hpp.

◆ IsShadowPassActive()

virtual bool Sleak::RenderEngine::VulkanRenderer::IsShadowPassActive ( ) const
inlineoverridevirtual

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 178 of file VulkanRenderer.hpp.

◆ Resize()

void Sleak::RenderEngine::VulkanRenderer::Resize ( uint32_t width,
uint32_t height )
overridevirtual

Recreates the swapchain for the new window dimensions.

Implements Sleak::RenderEngine::Renderer.

Definition at line 1264 of file VulkanRenderer.cpp.

◆ SetLightVP()

void Sleak::RenderEngine::VulkanRenderer::SetLightVP ( const float * lightVP)
overridevirtual

Stages the light view-projection matrix for commit at the next BeginRender.

Reimplemented from Sleak::RenderEngine::Renderer.

Definition at line 609 of file VulkanShadow.cpp.

◆ SetRender()

void Sleak::RenderEngine::VulkanRenderer::SetRender ( bool value)
inline

Definition at line 81 of file VulkanRenderer.hpp.

◆ SetRenderFace()

void Sleak::RenderEngine::VulkanRenderer::SetRenderFace ( RenderFace face)
overridevirtual

Stores the cull face for the next pipeline rebuild (Vulkan state is baked).

Implements Sleak::RenderEngine::RenderContext.

Definition at line 640 of file VulkanRenderer.cpp.

◆ SetRenderMode()

void Sleak::RenderEngine::VulkanRenderer::SetRenderMode ( RenderMode mode)
overridevirtual

Stores the polygon mode for the next pipeline rebuild (Vulkan state is baked).

Implements Sleak::RenderEngine::RenderContext.

Definition at line 647 of file VulkanRenderer.cpp.

◆ SetViewport()

void Sleak::RenderEngine::VulkanRenderer::SetViewport ( float x,
float y,
float width,
float height,
float minDepth = 0.0f,
float maxDepth = 1.0f )
overridevirtual

Sets the dynamic viewport on the active command buffer.

Implements Sleak::RenderEngine::RenderContext.

Definition at line 653 of file VulkanRenderer.cpp.

◆ UpdateDeferredCB()

void Sleak::RenderEngine::VulkanRenderer::UpdateDeferredCB ( const void * data,
uint32_t size )
overridevirtual

Copies deferred CB data into the current frame's UBO and snapshots the camera matrices.

Reimplemented from Sleak::RenderEngine::RenderContext.

Definition at line 1282 of file VulkanDeferred.cpp.

◆ UpdateShadowLightUBO()

void Sleak::RenderEngine::VulkanRenderer::UpdateShadowLightUBO ( const void * data,
uint32_t size )
overridevirtual

Copies light and shadow data into the current frame's mapped UBO.

Reimplemented from Sleak::RenderEngine::Renderer.

Definition at line 602 of file VulkanShadow.cpp.

◆ WaitIdle()

void Sleak::RenderEngine::VulkanRenderer::WaitIdle ( )
overridevirtual

Blocks until the device finishes all submitted GPU work.

Reimplemented from Sleak::RenderEngine::Renderer.

Definition at line 1004 of file VulkanRenderer.cpp.