API Documentation
Loading...
Searching...
No Matches
VulkanCameraManager.h
Go to the documentation of this file.
1/**--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Graphics
28File: VulkanCameraManager
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "VulkanDefines.h"
35#include "VulkanBuffer.h"
36#include "Shader.h"
38
39struct VkPushConstantRange;
42DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout);
44
45namespace NDEVR
46{
47 class GraphicsUpdateArguments;
48 class Camera;
49
51 {
52 public:
53
57 void cleanup();
58 VkSampler sampler() const { lib_assert(m_sampler != vk_null, "Bad Sampler"); return m_sampler; }
59 void createPipeline(VkDescriptorPool pool);
61 VkDescriptorSet descriptorSet() const
62 {
63 return m_descriptor_set;
64 }
65 void commit();
67 static VkDescriptorSetLayout descriptorSetLayout(ConstPointer<VulkanDevice> instance);
68
69 protected:
70 void createDescriptorSet(VkDescriptorPool pool);
71
72 protected:
75
76 VkDescriptorPool m_descriptor_pool;
77 VkDescriptorSet m_descriptor_set;
78
79 VkSampler m_sampler;
80 };
81}
#define lib_assert(expression, message)
Asserts some logic in the code. Disabled in non debug mode by default. Can be re-enabled in release u...
Definition LibAssert.h:70
#define vk_null
Definition VulkanDefines.h:11
#define DEFINE_NON_DISPATCHABLE_HANDLE(object)
Definition VulkanInstance.h:49
Definition GraphicsPipeline.h:42
Definition Pointer.hpp:303
Definition GraphicsCameraManager.h:64
CameraUniformObject m_camera_uniform
Definition GraphicsCameraManager.h:87
Definition VulkanCameraManager.h:51
VkSampler sampler() const
Definition VulkanCameraManager.h:58
VkDescriptorSet m_descriptor_set
Definition VulkanCameraManager.h:77
void resetPool()
Definition VulkanCameraManager.h:66
void createDescriptorSet(VkDescriptorPool pool)
Definition VulkanCameraManager.cpp:90
VkSampler m_sampler
Definition VulkanCameraManager.h:79
DynamicPointer< VulkanBuffer > m_camera_uniform_buffer
Definition VulkanCameraManager.h:74
void cleanup()
Definition VulkanCameraManager.cpp:43
~VulkanCameraManager()
Definition VulkanCameraManager.cpp:39
VkDescriptorPool m_descriptor_pool
Definition VulkanCameraManager.h:76
const CameraUniformObject & uniformObject() const
Definition VulkanCameraManager.h:60
static VkDescriptorSetLayout descriptorSetLayout(ConstPointer< VulkanDevice > instance)
Definition VulkanCameraManager.cpp:60
ConstPointer< VulkanDevice > m_device
Definition VulkanCameraManager.h:73
VulkanCameraManager(const ConstPointer< VulkanDevice > &device)
Definition VulkanCameraManager.cpp:18
void commit()
Definition VulkanCameraManager.cpp:53
void createPipeline(VkDescriptorPool pool)
Definition VulkanCameraManager.cpp:125
VkDescriptorSet descriptorSet() const
Definition VulkanCameraManager.h:61
Definition ACIColor.h:37
Definition GraphicsCameraManager.h:44