summaryrefslogtreecommitdiff
path: root/src/mbgl/sprite
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-09-27 17:52:14 +0200
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-09-27 11:03:29 -0700
commit44c7e9d05edbe6fee9e8f98b91380b6c07e57ac7 (patch)
treecb2ee7fed51efe737543bb6f2444fac885571c41 /src/mbgl/sprite
parentce42d22984d19fa020e6fba77e2585c0fd9dacf4 (diff)
downloadqtlocation-mapboxgl-44c7e9d05edbe6fee9e8f98b91380b6c07e57ac7.tar.gz
[core] merge gl::ObjectStore into gl::Context
Diffstat (limited to 'src/mbgl/sprite')
-rw-r--r--src/mbgl/sprite/sprite_atlas.cpp8
-rw-r--r--src/mbgl/sprite/sprite_atlas.hpp6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mbgl/sprite/sprite_atlas.cpp b/src/mbgl/sprite/sprite_atlas.cpp
index f94943be1a..b17bb7c2ec 100644
--- a/src/mbgl/sprite/sprite_atlas.cpp
+++ b/src/mbgl/sprite/sprite_atlas.cpp
@@ -282,9 +282,9 @@ void SpriteAtlas::copy(const Holder& holder, const SpritePatternMode mode) {
dirtyFlag = true;
}
-void SpriteAtlas::upload(gl::ObjectStore& objectStore, gl::Context& context, uint32_t unit) {
+void SpriteAtlas::upload(gl::Context& context, uint32_t unit) {
if (dirtyFlag) {
- bind(false, objectStore, context, unit);
+ bind(false, context, unit);
}
}
@@ -316,13 +316,13 @@ void SpriteAtlas::updateDirty() {
dirtySprites.clear();
}
-void SpriteAtlas::bind(bool linear, gl::ObjectStore& objectStore, gl::Context& context, uint32_t unit) {
+void SpriteAtlas::bind(bool linear, gl::Context& context, uint32_t unit) {
if (!data) {
return; // Empty atlas
}
if (!texture) {
- texture = objectStore.createTexture();
+ texture = context.createTexture();
context.activeTexture = unit;
context.texture[unit] = *texture;
#ifndef GL_ES_VERSION_2_0
diff --git a/src/mbgl/sprite/sprite_atlas.hpp b/src/mbgl/sprite/sprite_atlas.hpp
index 89ae148c30..b4ee5ae48c 100644
--- a/src/mbgl/sprite/sprite_atlas.hpp
+++ b/src/mbgl/sprite/sprite_atlas.hpp
@@ -2,7 +2,7 @@
#include <mbgl/geometry/binpack.hpp>
#include <mbgl/gl/gl.hpp>
-#include <mbgl/gl/object_store.hpp>
+#include <mbgl/gl/object.hpp>
#include <mbgl/util/noncopyable.hpp>
#include <mbgl/util/optional.hpp>
#include <mbgl/sprite/sprite_image.hpp>
@@ -83,14 +83,14 @@ public:
SpritePatternMode mode = SpritePatternMode::Single);
// Binds the atlas texture to the GPU, and uploads data if it is out of date.
- void bind(bool linear, gl::ObjectStore&, gl::Context&, uint32_t unit);
+ void bind(bool linear, gl::Context&, uint32_t unit);
// Updates sprites in the atlas texture that may have changed.
void updateDirty();
// Uploads the texture to the GPU to be available when we need it. This is a lazy operation;
// the texture is only bound when the data is out of date (=dirty).
- void upload(gl::ObjectStore&, gl::Context&, uint32_t unit);
+ void upload(gl::Context&, uint32_t unit);
dimension getWidth() const { return width; }
dimension getHeight() const { return height; }