Kale
Loading...
Searching...
No Matches
src
Kale
Vulkan
Renderer
Renderer.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/ChildResource/ChildResource.hpp
>
22
#include <
Kale/Vulkan/ParentResource/ParentResource.hpp
>
23
#include <
Kale/Vulkan/Device/Device.hpp
>
24
#include <
Kale/Vulkan/SwapChain/SwapChain.hpp
>
25
26
#include <vulkan/vulkan.hpp>
27
28
namespace
Kale::Vulkan
{
29
33
class
Renderer
:
public
ParentResource
<Renderer>,
public
ChildResource
<SwapChain> {
34
private
:
35
39
void
createRenderPass
();
40
41
// Used for assertion that frame buffers created with renderers have the appropriate swapchain parent
42
#ifdef KALE_DEBUG
43
protected
:
44
48
const
SwapChain
* getSwapChain()
const
;
49
50
friend
class
FrameBuffer
;
51
52
#endif
53
54
public
:
55
59
vk::UniqueRenderPass
renderPass
;
60
64
Renderer
();
65
69
void
init
();
70
74
void
freeResources
(
bool
remove =
true
)
override
;
75
76
};
77
}
78
79
#endif
ChildResource.hpp
Device.hpp
ParentResource.hpp
SwapChain.hpp
Kale::Vulkan::ChildResource
Definition
ChildResource.hpp:33
Kale::Vulkan::FrameBuffer
Definition
FrameBuffer.hpp:35
Kale::Vulkan::ParentResource
Definition
ParentResource.hpp:35
Kale::Vulkan::Renderer
Definition
Renderer.hpp:33
Kale::Vulkan::Renderer::init
void init()
Definition
Renderer.cpp:36
Kale::Vulkan::Renderer::renderPass
vk::UniqueRenderPass renderPass
Definition
Renderer.hpp:59
Kale::Vulkan::Renderer::Renderer
Renderer()
Definition
Renderer.cpp:29
Kale::Vulkan::Renderer::createRenderPass
void createRenderPass()
Definition
Renderer.cpp:44
Kale::Vulkan::Renderer::freeResources
void freeResources(bool remove=true) override
Definition
Renderer.cpp:62
Kale::Vulkan::SwapChain
Definition
SwapChain.hpp:39
Kale::Vulkan
Definition
Window.hpp:42
Generated on Tue Mar 12 2024 00:05:56 for Kale by
1.10.0