4#include <unordered_map>
6#include <vk_mem_alloc.h>
7#include <vulkan/vulkan.h>
45 VkCommandBuffer commandBuffer,
47 RenderProcess & renderProcess,
72 const std::vector<Components::WidgetComponent *> & activeWidgets,
85 VkFormat
format_ = VK_FORMAT_R8G8B8A8_UNORM;
89 std::unordered_map<Components::WidgetComponent *, Target>
targets_;
The application context is the core class which stores the basic openxr and vulkan objects.
Manages game objects within a scene, handling registration, ID allocation, and GPU buffer synchroniza...
Target & ensureTarget(Components::WidgetComponent &widget, Core::AssetManager &assetManager)
std::unordered_map< Components::WidgetComponent *, Target > targets_
Core::ApplicationContext * context_
void cleanup(Core::AssetManager *assetManager)
ImGuiContext * imguiContext_
void init(Core::ApplicationContext *context, uint32_t framesInFlight)
void pruneInactiveTargets(const std::vector< Components::WidgetComponent * > &activeWidgets, Core::AssetManager &assetManager)
WorldUiRenderer()=default
void destroyTarget(Target &target, Core::AssetManager *assetManager) const
uint32_t ensureWidgetTexture(Components::WidgetComponent &widget, Core::AssetManager &assetManager)
void createTargetImages(Target &target) const
VkDescriptorPool descriptorPool_
void renderWidgets(VkCommandBuffer commandBuffer, uint32_t frameIndex, RenderProcess &renderProcess, Core::SceneManager *sceneManager, Core::AssetManager *assetManager)
WorldUiRenderer & operator=(const WorldUiRenderer &)=delete
void transitionTargetsToShaderRead(VkCommandBuffer commandBuffer, uint32_t frameIndex)
void transitionTargetsToColorAttachment(VkCommandBuffer commandBuffer, uint32_t frameIndex)
WorldUiRenderer(const WorldUiRenderer &)=delete
void renderTarget(VkCommandBuffer commandBuffer, Target &target, uint32_t frameIndex) const
Manages IBL (Image-Based Lighting) resources for specular reflections.
VkImageLayout currentLayout
std::vector< TargetFrame > frames
Components::WidgetComponent * widget