mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +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
|
|
@ -43,10 +43,11 @@ ModelBatch::ModelBatch(size_t capacity, Assets* assets, Chunks* chunks)
|
|||
assets(assets),
|
||||
chunks(chunks)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
ModelBatch::~ModelBatch() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue