Vulkan Schnee
0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
DataBuffer.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <vulkan/vulkan.h>
4
#include <vk_mem_alloc.h>
5
6
class
Context;
7
8
namespace
EngineCore
{
9
class
DataBuffer
final
10
{
11
public
:
12
DataBuffer
(VkDevice
device
,
13
VkPhysicalDevice
physicalDevice
,
14
VmaAllocator allocator,
15
VkBufferUsageFlags bufferUsageFlags,
16
VkMemoryPropertyFlags memoryProperties,
17
VkDeviceSize
size
);
18
~DataBuffer
();
19
20
bool
copyTo
(
const
DataBuffer
& target, VkCommandBuffer commandBuffer, VkQueue queue)
const
;
21
void
*
map
()
const
;
22
void
unmap
()
const
;
23
24
VkBuffer
getBuffer
()
const
;
25
26
private
:
27
28
VkDevice
device
=
nullptr
;
29
VkPhysicalDevice
physicalDevice
=
nullptr
;
30
VmaAllocator
allocator_
= VK_NULL_HANDLE;
31
32
VkBuffer
buffer
=
nullptr
;
33
VmaAllocation
allocation_
= VK_NULL_HANDLE;
34
VkDeviceSize
size
= 0u;
35
};
36
}
EngineCore::DataBuffer::device
VkDevice device
Definition
DataBuffer.h:28
EngineCore::DataBuffer::buffer
VkBuffer buffer
Definition
DataBuffer.h:32
EngineCore::DataBuffer::allocation_
VmaAllocation allocation_
Definition
DataBuffer.h:33
EngineCore::DataBuffer::DataBuffer
DataBuffer(VkDevice device, VkPhysicalDevice physicalDevice, VmaAllocator allocator, VkBufferUsageFlags bufferUsageFlags, VkMemoryPropertyFlags memoryProperties, VkDeviceSize size)
Definition
DataBuffer.cpp:8
EngineCore::DataBuffer::getBuffer
VkBuffer getBuffer() const
Definition
DataBuffer.cpp:101
EngineCore::DataBuffer::copyTo
bool copyTo(const DataBuffer &target, VkCommandBuffer commandBuffer, VkQueue queue) const
Definition
DataBuffer.cpp:55
EngineCore::DataBuffer::physicalDevice
VkPhysicalDevice physicalDevice
Definition
DataBuffer.h:29
EngineCore::DataBuffer::map
void * map() const
Definition
DataBuffer.cpp:79
EngineCore::DataBuffer::~DataBuffer
~DataBuffer()
Definition
DataBuffer.cpp:45
EngineCore::DataBuffer::allocator_
VmaAllocator allocator_
Definition
DataBuffer.h:30
EngineCore::DataBuffer::size
VkDeviceSize size
Definition
DataBuffer.h:34
EngineCore::DataBuffer::unmap
void unmap() const
Definition
DataBuffer.cpp:93
EngineCore
Log category system implementation.
Definition
CameraComponent.cpp:8
Engine
include
Engine
Core
DataBuffer.h
Generated by
1.14.0