mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
leaks fix (valgrind full leak check) in world
This commit is contained in:
parent
f8289a5d78
commit
3b4fc2dfea
10 changed files with 215 additions and 222 deletions
|
|
@ -64,11 +64,11 @@ void Texture::setNearestFilter() {
|
|||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
}
|
||||
|
||||
Texture* Texture::from(const ImageData* image) {
|
||||
std::unique_ptr<Texture> Texture::from(const ImageData* image) {
|
||||
uint width = image->getWidth();
|
||||
uint height = image->getHeight();
|
||||
const void* data = image->getData();
|
||||
return new Texture((ubyte*)data, width, height, image->getFormat());
|
||||
return std::make_unique<Texture>((ubyte*)data, width, height, image->getFormat());
|
||||
}
|
||||
|
||||
uint Texture::getWidth() const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue