Update buffer pool handling to use less memory
This commit is contained in:
@@ -74,6 +74,7 @@ namespace OpenVulkano::Vulkan
|
|||||||
|
|
||||||
void Renderer::Tick()
|
void Renderer::Tick()
|
||||||
{
|
{
|
||||||
|
if (!scene) [[unlikely]] return;
|
||||||
currentImageId = context.swapChain.AcquireNextImage();
|
currentImageId = context.swapChain.AcquireNextImage();
|
||||||
scene->GetCamera()->SetSize(context.window->GetWidth(), context.window->GetHeight());
|
scene->GetCamera()->SetSize(context.window->GetWidth(), context.window->GetHeight());
|
||||||
scene->GetCamera()->SetContentScaleFactor(context.window->GetContentScale());
|
scene->GetCamera()->SetContentScaleFactor(context.window->GetContentScale());
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ namespace OpenVulkano::Vulkan
|
|||||||
|
|
||||||
[[nodiscard]] void* GetMappedMemory() const { return mapped; }
|
[[nodiscard]] void* GetMappedMemory() const { return mapped; }
|
||||||
|
|
||||||
|
template <typename T = char>
|
||||||
|
[[nodiscard]] T* GetMappedMemory() const { return static_cast<T*>(mapped); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Maps the buffer into the memory of the host.
|
* \brief Maps the buffer into the memory of the host.
|
||||||
* \tparam T The type of the buffers data.
|
* \tparam T The type of the buffers data.
|
||||||
|
|||||||
Reference in New Issue
Block a user