refactor: format all files
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
namespace td {
|
||||
namespace render {
|
||||
|
||||
void VertexCache::addData(std::uint64_t index, std::vector<float> positions, std::vector<float> colors){
|
||||
void VertexCache::addData(std::uint64_t index, std::vector<float> positions, std::vector<float> colors) {
|
||||
ElementsIndex positionsIndexes;
|
||||
positionsIndexes.first = m_Positions.end();
|
||||
m_Positions.insert(m_Positions.end(), positions.begin(), positions.end());
|
||||
@@ -15,12 +15,12 @@ void VertexCache::addData(std::uint64_t index, std::vector<float> positions, std
|
||||
m_Colors.insert(m_Colors.end(), colors.begin(), colors.end());
|
||||
colorsIndexes.second = m_Colors.end() - 1;
|
||||
|
||||
m_Indexes.insert({index, {positionsIndexes, colorsIndexes}});
|
||||
m_Indexes.insert({ index, {positionsIndexes, colorsIndexes} });
|
||||
}
|
||||
|
||||
void VertexCache::removeData(std::uint64_t index){
|
||||
void VertexCache::removeData(std::uint64_t index) {
|
||||
auto it = m_Indexes.find(index);
|
||||
if(it != m_Indexes.end()){
|
||||
if (it != m_Indexes.end()) {
|
||||
DataIndex indexes = it->second;
|
||||
ElementsIndex positionsIndexes = indexes.first;
|
||||
ElementsIndex colorsIndexes = indexes.second;
|
||||
@@ -32,13 +32,13 @@ void VertexCache::removeData(std::uint64_t index){
|
||||
}
|
||||
}
|
||||
|
||||
void VertexCache::clear(){
|
||||
void VertexCache::clear() {
|
||||
m_Positions.clear();
|
||||
m_Colors.clear();
|
||||
m_Indexes.clear();
|
||||
}
|
||||
|
||||
void VertexCache::updateVertexArray(){
|
||||
void VertexCache::updateVertexArray() {
|
||||
m_VertexArray = std::make_unique<GL::VertexArray>(m_Colors.size()); // one color per vertex
|
||||
|
||||
GL::VertexBuffer positionsBuffer(m_Positions, 2);
|
||||
|
||||
Reference in New Issue
Block a user