'Assets', some refactor

This commit is contained in:
MihailRis
2022-03-03 18:14:34 +03:00
committed by GitHub
parent b7e8ff5bea
commit 2aba3e91db
19 changed files with 350 additions and 213 deletions
+18
View File
@@ -0,0 +1,18 @@
#include "Batch2D.h"
#include "Mesh.h"
Batch2D::Batch2D(size_t capacity) : capacity(capacity),
offset(0),
color(1.0f, 1.0f, 1.0f, 1.0f){
const int attrs[] = {
2, 2, 4, 0 //null terminator
};
buffer = new float[capacity];
mesh = new Mesh(nullptr, 0, attrs);
}
Batch2D::~Batch2D(){
delete buffer;
delete mesh;
}