summaryrefslogtreecommitdiff
path: root/src/util/raster.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-05-30 17:00:47 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-05-30 17:00:47 +0200
commit78fda8bb62a85fe0a536d2f38832a6123739e4c1 (patch)
treebb89f96a11341554101557b41a9ebad75d99a368 /src/util/raster.cpp
parent3e7f801de11ef6a73578f58cbd89b61a6448924b (diff)
downloadqtlocation-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.cpp6
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);