diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-09-29 15:32:48 +0200 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-09-29 10:17:47 -0700 |
commit | cc78b74098e02311cc646fe5b82c13641ff705fa (patch) | |
tree | af0219d5611f0984bf3b244a336fbc6074a44cb4 /src/mbgl/geometry/line_atlas.hpp | |
parent | 15aece8a30dcc1f1f97e28180edda46d05641a2d (diff) | |
download | qtlocation-mapboxgl-cc78b74098e02311cc646fe5b82c13641ff705fa.tar.gz |
[core] remove dependence on gl.h types
Diffstat (limited to 'src/mbgl/geometry/line_atlas.hpp')
-rw-r--r-- | src/mbgl/geometry/line_atlas.hpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mbgl/geometry/line_atlas.hpp b/src/mbgl/geometry/line_atlas.hpp index cb957901f3..e974b4ff02 100644 --- a/src/mbgl/geometry/line_atlas.hpp +++ b/src/mbgl/geometry/line_atlas.hpp @@ -1,6 +1,5 @@ #pragma once -#include <mbgl/gl/gl.hpp> #include <mbgl/gl/object.hpp> #include <mbgl/util/optional.hpp> @@ -27,24 +26,24 @@ enum class LinePatternCap : bool { class LineAtlas { public: - LineAtlas(GLsizei width, GLsizei height); + LineAtlas(uint16_t width, uint16_t height); ~LineAtlas(); // Binds the atlas texture to the GPU, and uploads data if it is out of date. - void bind(gl::Context&, uint32_t unit); + void bind(gl::Context&, gl::TextureUnit 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&, uint32_t unit); + void upload(gl::Context&, gl::TextureUnit unit); LinePatternPos getDashPosition(const std::vector<float>&, LinePatternCap); LinePatternPos addDash(const std::vector<float>& dasharray, LinePatternCap); - const GLsizei width; - const GLsizei height; + const uint16_t width; + const uint16_t height; private: - const std::unique_ptr<GLbyte[]> data; + const std::unique_ptr<char[]> data; bool dirty; mbgl::optional<gl::UniqueTexture> texture; int nextRow = 0; |