free ram and tyrobj wip

This commit is contained in:
h4570
2022-07-26 19:32:20 +02:00
parent 70028a8f18
commit 7a9b294945
15 changed files with 550 additions and 27 deletions
@@ -40,21 +40,25 @@ MeshBuilderFrameData::~MeshBuilderFrameData() {
}
void MeshBuilderFrameData::allocateTextureCoords(const u32& count) {
if (count == 0) return;
textureCoordsCount = count;
textureCoords = new Vec4[count];
}
void MeshBuilderFrameData::allocateVertices(const u32& count) {
if (count == 0) return;
verticesCount = count;
vertices = new Vec4[count];
}
void MeshBuilderFrameData::allocateNormals(const u32& count) {
if (count == 0) return;
normalsCount = count;
normals = new Vec4[count];
}
void MeshBuilderFrameData::allocateColors(const u32& count) {
if (count == 0) return;
colorsCount = count;
colors = new Color[count];
}