Cubemap class

This commit is contained in:
MihailRis
2024-03-07 13:40:38 +03:00
parent 87edb1d45e
commit eefd327845
10 changed files with 105 additions and 41 deletions
+2 -4
View File
@@ -19,20 +19,18 @@ Batch3D::Batch3D(size_t capacity)
};
buffer = new float[capacity * B3D_VERTEX_SIZE];
mesh = new Mesh(buffer, 0, attrs);
mesh = std::make_unique<Mesh>(buffer, 0, attrs);
index = 0;
ubyte pixels[] = {
255, 255, 255, 255,
};
blank = new Texture(pixels, 1, 1, GL_RGBA);
blank = std::make_unique<Texture>(pixels, 1, 1, ImageFormat::rgba8888);
_texture = nullptr;
}
Batch3D::~Batch3D(){
delete blank;
delete[] buffer;
delete mesh;
}
void Batch3D::begin(){