Add handling for camera intrinsics

This commit is contained in:
Georg Hagen
2024-07-07 16:53:48 +02:00
parent 5b2a2bbf72
commit aabc24616d
18 changed files with 447 additions and 213 deletions

View File

@@ -0,0 +1,35 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#pragma once
#include "Base/ICloseable.hpp"
namespace OpenVulkano::Scene
{
class UniformBuffer
{
public:
static constexpr inline DescriptorSetLayoutBinding DESCRIPTOR_SET_LAYOUT_BINDING = { 0, DescriptorSetLayoutBinding::Type::TYPE_UNIFORM_BUFFER, 1, ShaderProgramType::ALL_GRAPHICS };
DescriptorSetLayoutBinding binding;
uint32_t setId = 2;
ICloseable* renderBuffer = nullptr;
size_t size = 0;
const void* data = nullptr;
UpdateFrequency updateFrequency = UpdateFrequency::Never;
bool updated = true;
void Init(size_t size, const void* data, const DescriptorSetLayoutBinding& binding = DESCRIPTOR_SET_LAYOUT_BINDING)
{
this->size = size;
this->data = data;
this->binding = binding;
}
UpdateFrequency GetUpdateFrequency() const { return updateFrequency; }
};
}