diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-09-27 13:00:27 +0200 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-09-27 11:03:29 -0700 |
commit | ce42d22984d19fa020e6fba77e2585c0fd9dacf4 (patch) | |
tree | 76e1a33a58bfb023987de1cc7aca59e649624db3 /src/mbgl/text/glyph_atlas.cpp | |
parent | 21386b31465302d63cae5d93680442555c8560f1 (diff) | |
download | qtlocation-mapboxgl-ce42d22984d19fa020e6fba77e2585c0fd9dacf4.tar.gz |
[core] rename gl::Config to gl::Context
Diffstat (limited to 'src/mbgl/text/glyph_atlas.cpp')
-rw-r--r-- | src/mbgl/text/glyph_atlas.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mbgl/text/glyph_atlas.cpp b/src/mbgl/text/glyph_atlas.cpp index f46c156b20..d5938ec0ed 100644 --- a/src/mbgl/text/glyph_atlas.cpp +++ b/src/mbgl/text/glyph_atlas.cpp @@ -3,7 +3,7 @@ #include <mbgl/text/glyph_pbf.hpp> #include <mbgl/gl/gl.hpp> #include <mbgl/gl/object_store.hpp> -#include <mbgl/gl/gl_config.hpp> +#include <mbgl/gl/context.hpp> #include <mbgl/platform/log.hpp> #include <mbgl/platform/platform.hpp> @@ -204,14 +204,14 @@ void GlyphAtlas::removeGlyphs(uintptr_t tileUID) { } } -void GlyphAtlas::upload(gl::ObjectStore& store, gl::Config& config, uint32_t unit) { +void GlyphAtlas::upload(gl::ObjectStore& store, gl::Context& context, uint32_t unit) { if (dirty) { const bool first = !texture; - bind(store, config, unit); + bind(store, context, unit); std::lock_guard<std::mutex> lock(mtx); - config.activeTexture = unit; + context.activeTexture = unit; if (first) { MBGL_CHECK_ERROR(glTexImage2D( GL_TEXTURE_2D, // GLenum target @@ -242,11 +242,11 @@ void GlyphAtlas::upload(gl::ObjectStore& store, gl::Config& config, uint32_t uni } } -void GlyphAtlas::bind(gl::ObjectStore& store, gl::Config& config, uint32_t unit) { +void GlyphAtlas::bind(gl::ObjectStore& store, gl::Context& context, uint32_t unit) { if (!texture) { texture = store.createTexture(); - config.activeTexture = unit; - config.texture[unit] = *texture; + context.activeTexture = unit; + context.texture[unit] = *texture; #ifndef GL_ES_VERSION_2_0 MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0)); #endif @@ -254,9 +254,9 @@ void GlyphAtlas::bind(gl::ObjectStore& store, gl::Config& config, uint32_t unit) MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)); MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)); MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)); - } else if (config.texture[unit] != *texture) { - config.activeTexture = unit; - config.texture[unit] = *texture; + } else if (context.texture[unit] != *texture) { + context.activeTexture = unit; + context.texture[unit] = *texture; } } |