Class VulkanRenderer#

Class Documentation#

class VulkanRenderer#

Public Functions

VulkanRenderer(Kataglyphis::Frontend::Window *window, Scene *scene, Kataglyphis::Frontend::GUI *gui, Camera *camera)#
void drawFrame(const GUISceneSharedVars &guiSceneSharedVars)#
void updateUniforms(Scene *scene_data, Camera *camera_data, const GUISceneSharedVars &guiSceneSharedVars)#
std::optional<uint32_t> addModel(const std::string &modelPath, const glm::mat4 &modelMatrix)#

Adds a model to the current scene without replacing what is already there, and refreshes the descriptor sets that reference scene resources. Returns the new model’s index - the value the raster paths push as objectIndex - or std::nullopt if loading failed.

Lives here rather than on Scene alone because the caller would otherwise need the renderer’s device and command pool, and because forgetting the descriptor refresh leaves the new model sampling whatever the previous scene had bound.

inline bool isModelLoadPending() const#

True while the startup model is still parsing on its worker. Tests and tools that need the scene populated must render frames until this clears - the renderer draws the sky meanwhile rather than blocking.

void updateStateDueToUserInput(GUISceneSharedVars &guiSceneSharedVars)#
void finishAllRenderCommands()#
inline bool hasDeviceLost() const#
inline bool hasFatalFrameError() const#
bool supportsHardwareRaytracing() const#
bool supportsFrameCapture() const#
void requestFrameCapture()#
std::vector<uint8_t> takeCapturedFrame(uint32_t &outWidth, uint32_t &outHeight)#
void cleanUp()#
void recreateSwapChain()#
void reprovisionPerImageResources()#
~VulkanRenderer()#