diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-05-30 17:00:47 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-05-30 17:00:47 +0200 |
commit | 78fda8bb62a85fe0a536d2f38832a6123739e4c1 (patch) | |
tree | bb89f96a11341554101557b41a9ebad75d99a368 /src/util/raster.cpp | |
parent | 3e7f801de11ef6a73578f58cbd89b61a6448924b (diff) | |
download | qtlocation-mapboxgl-78fda8bb62a85fe0a536d2f38832a6123739e4c1.tar.gz |
make sure we retain shared state when destructing the map object
refs #261
Diffstat (limited to 'src/util/raster.cpp')
-rw-r--r-- | src/util/raster.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/raster.cpp b/src/util/raster.cpp index e08145231f..82ac0bda50 100644 --- a/src/util/raster.cpp +++ b/src/util/raster.cpp @@ -14,13 +14,13 @@ using namespace llmr; -Raster::Raster(Texturepool &texturepool) +Raster::Raster(const std::shared_ptr<Texturepool> &texturepool) : texturepool(texturepool) {} Raster::~Raster() { if (textured) { - texturepool.removeTextureID(texture); + texturepool->removeTextureID(texture); } } @@ -49,7 +49,7 @@ void Raster::bind(bool linear) { } if (img && !textured) { - texture = texturepool.getTextureID(); + texture = texturepool->getTextureID(); glBindTexture(GL_TEXTURE_2D, texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); |