VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
vulkanRenderTarget.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2025-2026 Arnis Lektauers
3//
4// Vulkan render target — VkFramebuffer + VkRenderPass (or dynamic rendering).
5//
6#pragma once
7
8#ifdef VISUTWIN_HAS_VULKAN
9
10#include <vulkan/vulkan.h>
11
13
14namespace visutwin::canvas
15{
16 class VulkanRenderTarget : public RenderTarget
17 {
18 public:
19 explicit VulkanRenderTarget(const RenderTargetOptions& options);
20 ~VulkanRenderTarget() override;
21
22 [[nodiscard]] VkFramebuffer framebuffer() const { return _framebuffer; }
23 [[nodiscard]] VkRenderPass renderPass() const { return _renderPass; }
24
25 protected:
26 void destroyFrameBuffers() override;
27 void createFrameBuffers() override;
28
29 private:
30 VkDevice _vkDevice = VK_NULL_HANDLE;
31 VkFramebuffer _framebuffer = VK_NULL_HANDLE;
32 VkRenderPass _renderPass = VK_NULL_HANDLE;
33 };
34}
35
36#endif // VISUTWIN_HAS_VULKAN