Memory leak fix

This commit is contained in:
Sebastian Piwell
2016-05-26 15:29:45 -04:00
parent 6f6e016602
commit edfff68491
5 changed files with 23 additions and 15 deletions
+11 -11
View File
@@ -62,7 +62,8 @@ bool TexturePlane::loadTexture() {
if(_futureObject.valid() && DownloadManager::futureReady(_futureObject)){
imageFile = _futureObject.get();
} else {
}
else {
return false;
}
@@ -73,18 +74,17 @@ bool TexturePlane::loadTexture() {
(void*) imageFile.buffer,
imageFile.size,
imageFile.format);
// delete[] (char*) imageFile.buffer;
// if (texture) {
// LDEBUG("Loaded texture from image iswa cygnet with id: '" << _data->id << "'");
if (texture) {
LDEBUG("Loaded texture from image iswa cygnet with id: '" << _data->id << "'");
// texture->uploadTexture();
// // Textures of planets looks much smoother with AnisotropicMipMap rather than linear
// texture->setFilter(ghoul::opengl::Texture::FilterMode::Linear);
// _textures[0] = std::move(texture);
// }
texture->uploadTexture();
// Textures of planets looks much smoother with AnisotropicMipMap rather than linear
texture->setFilter(ghoul::opengl::Texture::FilterMode::Linear);
_textures[0] = std::move(texture);
}
return false;
// return false;
}