memory refactor Texture and ImageData

This commit is contained in:
MihailRis
2024-06-30 21:24:46 +03:00
parent ce9c5b97c7
commit c0dca31e98
14 changed files with 191 additions and 160 deletions
+3 -2
View File
@@ -17,10 +17,11 @@ Batch2D::Batch2D(size_t capacity) : capacity(capacity), color(1.0f){
mesh = std::make_unique<Mesh>(buffer.get(), 0, attrs);
index = 0;
ubyte pixels[] = {
const ubyte pixels[] = {
0xFF, 0xFF, 0xFF, 0xFF
};
blank = std::make_unique<Texture>(pixels, 1, 1, ImageFormat::rgba8888);
ImageData image(ImageFormat::rgba8888, 1, 1, pixels);
blank = Texture::from(&image);
currentTexture = nullptr;
}