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/geometry/line_atlas.hpp | |
parent | aaa30c8a19bd608baf4c190f794258919365c36d (diff) | |
download | qtlocation-mapboxgl-4f26c8122a57cd5fe35a10dc2e125500179a75a5.tar.gz |
[core] track texture state to avoid redundand binds
Diffstat (limited to 'src/mbgl/geometry/line_atlas.hpp')
-rw-r--r-- | src/mbgl/geometry/line_atlas.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mbgl/geometry/line_atlas.hpp b/src/mbgl/geometry/line_atlas.hpp index 0ca5e95a23..1e6c0ac84e 100644 --- a/src/mbgl/geometry/line_atlas.hpp +++ b/src/mbgl/geometry/line_atlas.hpp @@ -9,6 +9,10 @@ namespace mbgl { +namespace gl { +class Config; +} // namespace gl + typedef struct { float width; float height; @@ -21,14 +25,14 @@ public: ~LineAtlas(); // Binds the atlas texture to the GPU, and uploads data if it is out of date. - void bind(gl::ObjectStore&); + void bind(gl::ObjectStore&, gl::Config&, uint32_t unit); // 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); - LinePatternPos getDashPosition(const std::vector<float>&, bool, gl::ObjectStore&); - LinePatternPos addDash(const std::vector<float> &dasharray, bool round, gl::ObjectStore&); + LinePatternPos getDashPosition(const std::vector<float>&, bool); + LinePatternPos addDash(const std::vector<float>& dasharray, bool round); const GLsizei width; const GLsizei height; |