-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuffer.cpp
More file actions
50 lines (43 loc) · 1012 Bytes
/
Copy pathbuffer.cpp
File metadata and controls
50 lines (43 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// Created by ytech on 2021/10/29.
//
#include "buffer.h"
#include "commonMacro.h"
using namespace Eigen;
namespace graphics
{
BufferData::BufferData()
{
LOG_INFO("BufferData constructor called");
}
BufferData::~BufferData()
{
LOG_INFO("BufferData constructor called");
}
BufferData::BufferData(BufferData&&)
{
LOG_INFO("BufferData moved constructor called");
}
BufferData::BufferData(const BufferData&)
{
LOG_INFO("BufferData cpoy constructor called");
}
PositionBufferHandle BufferData::loadPositions(const std::vector<Vector4f>& position)
{
auto id = getNextId();
m_positionBuf.emplace(id, position);
return { id };
}
IndicesBufferHandle BufferData::loadIndices(const std::vector<Vector3i>& indices)
{
auto id = getNextId();
m_indicesBuf.emplace(id, indices);
return { id };
}
ColorBufferHandle BufferData::loadColors(std::vector<Vector4f>& colors)
{
auto id = getNextId();
m_colorBuf.emplace(id, colors);
return { id };
}
} // namespace graphics