diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-03-06 18:26:32 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-03-12 11:03:54 +0100 |
commit | a7f151ab487d656340d4ace415abacf9e8cecbf9 (patch) | |
tree | 49d4ed12f2cbb8a256f4acbd6603d955f22907a2 /src/mbgl/geometry | |
parent | 2a25270298f358f815b22c87ece74fd3f37a42b5 (diff) | |
download | qtlocation-mapboxgl-a7f151ab487d656340d4ace415abacf9e8cecbf9.tar.gz |
[core] move Texture to the gfx namespace
Diffstat (limited to 'src/mbgl/geometry')
-rw-r--r-- | src/mbgl/geometry/line_atlas.cpp | 4 | ||||
-rw-r--r-- | src/mbgl/geometry/line_atlas.hpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mbgl/geometry/line_atlas.cpp b/src/mbgl/geometry/line_atlas.cpp index e0114befcb..0e82b4ffc7 100644 --- a/src/mbgl/geometry/line_atlas.cpp +++ b/src/mbgl/geometry/line_atlas.cpp @@ -126,7 +126,7 @@ Size LineAtlas::getSize() const { return image.size; } -void LineAtlas::upload(gl::Context& context, gl::TextureUnit unit) { +void LineAtlas::upload(gl::Context& context, uint8_t unit) { if (!texture) { texture = context.createTexture(image, unit); } else if (dirty) { @@ -136,7 +136,7 @@ void LineAtlas::upload(gl::Context& context, gl::TextureUnit unit) { dirty = false; } -void LineAtlas::bind(gl::Context& context, gl::TextureUnit unit) { +void LineAtlas::bind(gl::Context& context, uint8_t unit) { upload(context, unit); context.bindTexture(*texture, unit, gfx::TextureFilterType::Linear, gfx::TextureMipMapType::No, gfx::TextureWrapType::Repeat, gfx::TextureWrapType::Clamp); diff --git a/src/mbgl/geometry/line_atlas.hpp b/src/mbgl/geometry/line_atlas.hpp index b1e7a670c1..f262232872 100644 --- a/src/mbgl/geometry/line_atlas.hpp +++ b/src/mbgl/geometry/line_atlas.hpp @@ -1,6 +1,6 @@ #pragma once -#include <mbgl/gl/texture.hpp> +#include <mbgl/gfx/texture.hpp> #include <mbgl/gl/object.hpp> #include <mbgl/util/image.hpp> #include <mbgl/util/optional.hpp> @@ -33,11 +33,11 @@ public: ~LineAtlas(); // Binds the atlas texture to the GPU, and uploads data if it is out of date. - void bind(gl::Context&, gl::TextureUnit unit); + void bind(gl::Context&, uint8_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::Context&, gl::TextureUnit unit); + void upload(gl::Context&, uint8_t unit); LinePatternPos getDashPosition(const std::vector<float>&, LinePatternCap); LinePatternPos addDash(const std::vector<float>& dasharray, LinePatternCap); @@ -47,7 +47,7 @@ public: private: const AlphaImage image; bool dirty; - mbgl::optional<gl::Texture> texture; + mbgl::optional<gfx::Texture> texture; uint32_t nextRow = 0; std::unordered_map<size_t, LinePatternPos> positions; }; |