diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-05-31 02:35:10 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-01 13:53:39 +0300 |
commit | 2038a21cb5d67890acafbd34bc55e365ed0043fe (patch) | |
tree | 78551ce4bd635966c1d1e22ad360731ec9da352f /src/mbgl/geometry/line_atlas.cpp | |
parent | a3e0c60a7c322c9040cfcf880cc7ca4956cf9e12 (diff) | |
download | qtlocation-mapboxgl-2038a21cb5d67890acafbd34bc55e365ed0043fe.tar.gz |
[core] s/GLObjectStore/ObjectStore/
Diffstat (limited to 'src/mbgl/geometry/line_atlas.cpp')
-rw-r--r-- | src/mbgl/geometry/line_atlas.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mbgl/geometry/line_atlas.cpp b/src/mbgl/geometry/line_atlas.cpp index 614e3280c7..7069b5f678 100644 --- a/src/mbgl/geometry/line_atlas.cpp +++ b/src/mbgl/geometry/line_atlas.cpp @@ -1,6 +1,6 @@ #include <mbgl/geometry/line_atlas.hpp> #include <mbgl/gl/gl.hpp> -#include <mbgl/gl/gl_object_store.hpp> +#include <mbgl/gl/object_store.hpp> #include <mbgl/platform/log.hpp> #include <mbgl/platform/platform.hpp> @@ -21,7 +21,7 @@ LineAtlas::LineAtlas(GLsizei w, GLsizei h) LineAtlas::~LineAtlas() { } -LinePatternPos LineAtlas::getDashPosition(const std::vector<float> &dasharray, bool round, gl::GLObjectStore& glObjectStore) { +LinePatternPos LineAtlas::getDashPosition(const std::vector<float> &dasharray, bool round, gl::ObjectStore& store) { size_t key = round ? std::numeric_limits<size_t>::min() : std::numeric_limits<size_t>::max(); for (const float part : dasharray) { boost::hash_combine<float>(key, part); @@ -30,7 +30,7 @@ LinePatternPos LineAtlas::getDashPosition(const std::vector<float> &dasharray, b // Note: We're not handling hash collisions here. const auto it = positions.find(key); if (it == positions.end()) { - auto inserted = positions.emplace(key, addDash(dasharray, round, glObjectStore)); + auto inserted = positions.emplace(key, addDash(dasharray, round, store)); assert(inserted.second); return inserted.first->second; } else { @@ -38,7 +38,7 @@ LinePatternPos LineAtlas::getDashPosition(const std::vector<float> &dasharray, b } } -LinePatternPos LineAtlas::addDash(const std::vector<float> &dasharray, bool round, gl::GLObjectStore& glObjectStore) { +LinePatternPos LineAtlas::addDash(const std::vector<float> &dasharray, bool round, gl::ObjectStore& store) { int n = round ? 7 : 0; int dashheight = 2 * n + 1; @@ -116,21 +116,21 @@ LinePatternPos LineAtlas::addDash(const std::vector<float> &dasharray, bool roun nextRow += dashheight; dirty = true; - bind(glObjectStore); + bind(store); return position; }; -void LineAtlas::upload(gl::GLObjectStore& glObjectStore) { +void LineAtlas::upload(gl::ObjectStore& store) { if (dirty) { - bind(glObjectStore); + bind(store); } } -void LineAtlas::bind(gl::GLObjectStore& glObjectStore) { +void LineAtlas::bind(gl::ObjectStore& store) { bool first = false; if (!texture.created()) { - texture.create(glObjectStore); + texture.create(store); MBGL_CHECK_ERROR(glBindTexture(GL_TEXTURE_2D, texture.getID())); MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)); MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)); |