Lugdunum
0.1.0
src
lug
Graphics
Vulkan
Render
Mesh.cpp
Go to the documentation of this file.
1
#include <
lug/Graphics/Vulkan/Render/Mesh.hpp
>
2
#include <
lug/Graphics/Vulkan/API/Builder/Buffer.hpp
>
3
#include <
lug/Graphics/Vulkan/API/Builder/DeviceMemory.hpp
>
4
#include <
lug/Graphics/Vulkan/API/Device.hpp
>
5
#include <
lug/System/Logger/Logger.hpp
>
6
7
namespace
lug
{
8
namespace
Graphics {
9
namespace
Vulkan
{
10
namespace
Render {
11
12
Mesh::Mesh
(
const
std::string& name) : ::
lug
::
Graphics
::Render::
Mesh
(name) {}
13
14
Mesh::~Mesh
() {
15
destroy
();
16
}
17
18
void
Mesh::destroy
() {
19
for
(
auto
& primitiveSet :
_primitiveSets
) {
20
if
(!primitiveSet._data) {
21
continue
;
22
}
23
24
PrimitiveSetData
* primitiveSetData =
static_cast<
PrimitiveSetData
*
>
(primitiveSet._data);
25
26
for
(
auto
& buffer : primitiveSetData->
buffers
) {
27
buffer.destroy();
28
}
29
30
delete
primitiveSetData;
31
}
32
33
_deviceMemory
.
destroy
();
34
}
35
36
}
// Render
37
}
// Vulkan
38
}
// Graphics
39
}
// lug
lug::Graphics::Vulkan::API::DeviceMemory::destroy
void destroy()
Definition:
DeviceMemory.cpp:41
Device.hpp
lug::Graphics::Vulkan::Render::Mesh
Definition:
Mesh.hpp:20
lug::Graphics::Vulkan::Render::Mesh::~Mesh
~Mesh() override final
Definition:
Mesh.cpp:14
lug::Graphics::Render::Mesh::_primitiveSets
std::vector< PrimitiveSet > _primitiveSets
Definition:
Mesh.hpp:97
Vulkan
Definition:
Vulkan.hpp:155
lug::Graphics::Vulkan::Render::Mesh::PrimitiveSetData
Definition:
Mesh.hpp:24
Logger.hpp
lug
Definition:
Application.hpp:11
DeviceMemory.hpp
lug::Graphics::Vulkan::Render::Mesh::Mesh
Mesh(const Mesh &)=delete
lug::Graphics::Vulkan::Render::Mesh::PrimitiveSetData::buffers
std::vector< API::Buffer > buffers
Definition:
Mesh.hpp:26
lug::Graphics::Vulkan::Render::Mesh::_deviceMemory
API::DeviceMemory _deviceMemory
Definition:
Mesh.hpp:44
lug::Graphics::Graphics
Class for graphics.
Definition:
Graphics.hpp:25
lug::Graphics::Vulkan::Render::Mesh::destroy
void destroy()
Definition:
Mesh.cpp:18
Buffer.hpp
Mesh.hpp
Generated by
1.8.13