summaryrefslogtreecommitdiff
path: root/src/mbgl/util/raster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/util/raster.cpp')
-rw-r--r--src/mbgl/util/raster.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/util/raster.cpp b/src/mbgl/util/raster.cpp
index d83bee4c3f..fc9cc1c256 100644
--- a/src/mbgl/util/raster.cpp
+++ b/src/mbgl/util/raster.cpp
@@ -26,14 +26,14 @@ void Raster::load(PremultipliedImage image) {
}
-void Raster::bind(bool linear, gl::TexturePool& texturePool, gl::ObjectStore& store) {
+void Raster::bind(bool linear, gl::ObjectStore& store) {
if (!width || !height) {
Log::Error(Event::OpenGL, "trying to bind texture without dimension");
return;
}
if (img.data && !texture) {
- upload(texturePool, store);
+ upload(store);
} else if (texture) {
MBGL_CHECK_ERROR(glBindTexture(GL_TEXTURE_2D, *texture));
}
@@ -46,9 +46,9 @@ void Raster::bind(bool linear, gl::TexturePool& texturePool, gl::ObjectStore& st
}
}
-void Raster::upload(gl::TexturePool& texturePool, gl::ObjectStore& store) {
+void Raster::upload(gl::ObjectStore& store) {
if (img.data && !texture) {
- texture = texturePool.acquireTexture(store);
+ texture = store.createTexture();
MBGL_CHECK_ERROR(glBindTexture(GL_TEXTURE_2D, *texture));
#ifndef GL_ES_VERSION_2_0
MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0));