Kale
Loading...
Searching...
No Matches
src
Kale
Vulkan
FrameBuffer
FrameBuffer.hpp
Go to the documentation of this file.
1
/*
2
Copyright 2022 Rishi Challa
3
4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7
8
http://www.apache.org/licenses/LICENSE-2.0
9
10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
*/
16
17
#pragma once
18
19
#ifdef KALE_VULKAN
20
21
#include <
Kale/Vulkan/ParentResource/ParentResource.hpp
>
22
#include <
Kale/Vulkan/ChildResource/ChildResource.hpp
>
23
#include <
Kale/Vulkan/DeviceMemory/DeviceMemory.hpp
>
24
#include <
Kale/Vulkan/Renderer/Renderer.hpp
>
25
#include <
Kale/Math/Vector/Vector.hpp
>
26
27
#include <vulkan/vulkan.hpp>
28
29
namespace
Kale::Vulkan
{
30
35
class
FrameBuffer
:
public
ParentResource
<FrameBuffer>,
public
ChildResource
<Renderer> {
36
private
:
37
44
void
createFrameBuffer
(
const
vk::UniqueImageView&
imageView
,
const
vk::Extent2D& extent,
45
const
vk::UniqueRenderPass& renderPass);
46
47
protected
:
48
53
void
freeResources
(
bool
remove)
override
;
54
55
public
:
56
60
DeviceMemory
imageMemory
;
61
65
vk::UniqueImage
image
;
66
70
vk::UniqueImageView
imageView
;
71
75
vk::UniqueFramebuffer
framebuffer
;
76
80
FrameBuffer
();
81
86
FrameBuffer
(
Renderer
& renderer,
const
Vector2ui32
& size);
87
92
void
init
(
Renderer
& renderer,
const
Vector2ui32
& size);
93
98
void
freeResources
();
99
};
100
}
101
102
#endif
ChildResource.hpp
DeviceMemory.hpp
ParentResource.hpp
Renderer.hpp
Vector.hpp
Kale::Vector2
Definition
Vector.hpp:41
Kale::Vulkan::ChildResource
Definition
ChildResource.hpp:33
Kale::Vulkan::DeviceMemory
Definition
DeviceMemory.hpp:38
Kale::Vulkan::FrameBuffer
Definition
FrameBuffer.hpp:35
Kale::Vulkan::FrameBuffer::init
void init(Renderer &renderer, const Vector2ui32 &size)
Definition
FrameBuffer.cpp:71
Kale::Vulkan::FrameBuffer::freeResources
void freeResources()
Definition
FrameBuffer.cpp:117
Kale::Vulkan::FrameBuffer::FrameBuffer
FrameBuffer()
Definition
FrameBuffer.cpp:36
Kale::Vulkan::FrameBuffer::image
vk::UniqueImage image
Definition
FrameBuffer.hpp:65
Kale::Vulkan::FrameBuffer::imageMemory
DeviceMemory imageMemory
Definition
FrameBuffer.hpp:60
Kale::Vulkan::FrameBuffer::imageView
vk::UniqueImageView imageView
Definition
FrameBuffer.hpp:70
Kale::Vulkan::FrameBuffer::framebuffer
vk::UniqueFramebuffer framebuffer
Definition
FrameBuffer.hpp:75
Kale::Vulkan::FrameBuffer::createFrameBuffer
void createFrameBuffer(const vk::UniqueImageView &imageView, const vk::Extent2D &extent, const vk::UniqueRenderPass &renderPass)
Definition
FrameBuffer.cpp:96
Kale::Vulkan::ParentResource
Definition
ParentResource.hpp:35
Kale::Vulkan::Renderer
Definition
Renderer.hpp:33
Kale::Vulkan
Definition
Window.hpp:42
Generated on Tue Mar 12 2024 00:05:56 for Kale by
1.10.0