Class VulkanRenderTarget¶
Defined in File vulkan_render_target.h
Inheritance Relationships¶
Base Type¶
public portal::renderer::RenderTarget(Class RenderTarget)
Class Documentation¶
-
class VulkanRenderTarget : public portal::renderer::RenderTarget¶
Vulkan render target.
Creates vk::RenderingInfo with color and depth attachments, clear values, and blending. Supports dynamic rendering (no explicit framebuffer objects).
Public Functions
-
VulkanRenderTarget(const RenderTargetProperties &prop, const VulkanContext &context)¶
Constructs Vulkan render target.
- Parameters:
prop – Render target configuration
-
~VulkanRenderTarget() override¶
-
virtual bool resize(size_t new_width, size_t new_height, bool force_recreate) override¶
Resizes render target, recreating attachments.
-
vk::RenderingInfo make_rendering_info()¶
Creates vk::RenderingInfo from custom attachments.
- Returns:
Vulkan rendering info structure
-
virtual size_t get_width() const override¶
Gets render target width.
-
virtual size_t get_height() const override¶
Gets render target height.
-
virtual glm::uvec4 get_viewport_bounds() const override¶
-
virtual size_t get_color_attachment_count() const override¶
Gets color attachment count.
-
virtual bool has_depth_attachment() const override¶
Checks if render target has depth attachment.
-
virtual const RenderTargetProperties &get_properties() const override¶
Gets render target properties.
-
ImageFormat get_depth_format() const¶
Gets depth attachment format.
-
virtual std::span<const ImageFormat> get_color_formats() const override¶
Gets color attachment formats.
-
virtual size_t get_color_images_count() const override¶
-
virtual bool has_depth_image() const override¶
Protected Functions
-
void initialize()¶
Creates Vulkan attachments.
-
void release()¶
Releases Vulkan resources.
Protected Attributes
-
const VulkanContext &context¶
-
size_t width = 0¶
-
size_t height = 0¶
-
std::vector<ImageFormat> color_formats¶
-
std::optional<ImageFormat> depth_format¶
-
std::vector<vk::RenderingAttachmentInfo> rendering_attachments¶
-
vk::RenderingAttachmentInfo depth_rendering¶
-
vk::RenderingInfo rendering_info¶
-
std::vector<Reference<VulkanImage>> color_images¶
-
Reference<VulkanImage> depth_image¶
-
VulkanRenderTarget(const RenderTargetProperties &prop, const VulkanContext &context)¶