VulkanEngine 0.1
Graphics engine using Vulkan
Loading...
Searching...
No Matches
RenderPass.h
1// Copyright (c) 2024 Michael Carlie. All Rights Reserved.
2//
3// This software is released under the MIT License.
4// https://opensource.org/licenses/MIT
5
6#ifndef INCLUDE_VULKANENGINE_RENDERPASS_H_
7#define INCLUDE_VULKANENGINE_RENDERPASS_H_
8
9#include <VulkanEngine/Image.h>
10#include <VulkanEngine/VulkanManager.h>
11
12#include <cstdint>
13#include <memory>
14#include <vector>
15
16// Forward decleration.
17class Image;
18
20namespace VulkanEngine {
22 public:
24 Image<vk::Format::eD32SfloatS8Uint, vk::ImageType::e2D,
25 vk::ImageTiling::eOptimal, vk::SampleCountFlagBits::e4>;
26
27 using ColorAttachment =
28 Image<vk::Format::eB8G8R8A8Unorm, vk::ImageType::e2D,
29 vk::ImageTiling::eOptimal, vk::SampleCountFlagBits::e4>;
30
31 public:
32 RenderPass(uint32_t _width, uint32_t _height);
33
35
36 const vk::RenderPass& getVkRenderPass() const;
37
38 const std::shared_ptr<DepthStencilImageAttachment> getDepthStencilAttachment()
39 const {
40 return depth_stencil_attachment;
41 }
42
43 const std::shared_ptr<ColorAttachment> getColorAttachment() const {
44 return color_attachment;
45 }
46
48 void begin();
49
51 void end();
52
53 private:
54 std::shared_ptr<DepthStencilImageAttachment> depth_stencil_attachment;
55
56 std::shared_ptr<ColorAttachment> color_attachment;
57
58 vk::RenderPass vk_render_pass;
59
60 uint32_t width;
61 uint32_t height;
62};
63
64} // namespace VulkanEngine
65
66#endif // INCLUDE_VULKANENGINE_RENDERPASS_H_
Definition: Image.h:32
Definition: RenderPass.h:21
void begin()
Begin the RenderPass.
Definition: RenderPass.cpp:140
void end()
End the RenderPass.
Definition: RenderPass.cpp:175
TODO development of this class is in progress.
Definition: Attribute.h:13