diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-07-07 19:13:16 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-07-08 13:11:25 +0200 |
commit | 4f26c8122a57cd5fe35a10dc2e125500179a75a5 (patch) | |
tree | 02381c3db2adedcc6afa721137a6fb318ec915dd /src/mbgl/sprite/sprite_atlas.hpp | |
parent | aaa30c8a19bd608baf4c190f794258919365c36d (diff) | |
download | qtlocation-mapboxgl-4f26c8122a57cd5fe35a10dc2e125500179a75a5.tar.gz |
[core] track texture state to avoid redundand binds
Diffstat (limited to 'src/mbgl/sprite/sprite_atlas.hpp')
-rw-r--r-- | src/mbgl/sprite/sprite_atlas.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mbgl/sprite/sprite_atlas.hpp b/src/mbgl/sprite/sprite_atlas.hpp index 4d1ee1c38c..4f44eb9ac9 100644 --- a/src/mbgl/sprite/sprite_atlas.hpp +++ b/src/mbgl/sprite/sprite_atlas.hpp @@ -16,6 +16,10 @@ namespace mbgl { +namespace gl { +class Config; +} // namespace gl + class SpriteStore; class SpriteImage; class SpritePosition; @@ -47,14 +51,14 @@ public: optional<SpriteAtlasPosition> getPosition(const std::string& name, bool repeating = false); // Binds the atlas texture to the GPU, and uploads data if it is out of date. - void bind(bool linear, gl::ObjectStore&); + void bind(bool linear, gl::ObjectStore&, gl::Config&, uint32_t unit); // Updates sprites in the atlas texture that may have changed in the source SpriteStore object. 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&); + void upload(gl::ObjectStore&, gl::Config&, uint32_t unit); dimension getWidth() const { return width; } dimension getHeight() const { return height; } |