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
@@ -20,10 +20,11 @@ Batch3D::Batch3D(size_t capacity)
mesh = std::make_unique<Mesh>(buffer.get(), 0, attrs);
index = 0;
ubyte pixels[] = {
const ubyte pixels[] = {
255, 255, 255, 255,
};
blank = std::make_unique<Texture>(pixels, 1, 1, ImageFormat::rgba8888);
ImageData image(ImageFormat::rgba8888, 1, 1, pixels);
blank = Texture::from(&image);
currentTexture = nullptr;
}