mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
memory refactor Texture and ImageData
This commit is contained in:
parent
ce9c5b97c7
commit
c0dca31e98
14 changed files with 191 additions and 160 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue