diff options
author | Ansis Brammanis <brammanis@gmail.com> | 2016-04-01 17:23:46 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-04-14 17:12:56 -0700 |
commit | d2b9b1c348ba71189792f1f6ba6c450729cd9a12 (patch) | |
tree | 43a9bb848f23dc09e9489abfa41b068e438d510e /include/mbgl/gl | |
parent | b55692132ae66b76a5136bf2ccffd112512f01e9 (diff) | |
download | qtlocation-mapboxgl-d2b9b1c348ba71189792f1f6ba6c450729cd9a12.tar.gz |
[core] always set activeTexture before binding a texture
Diffstat (limited to 'include/mbgl/gl')
-rw-r--r-- | include/mbgl/gl/gl_values.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/mbgl/gl/gl_values.hpp b/include/mbgl/gl/gl_values.hpp index a5d413f5af..2ebfe2e687 100644 --- a/include/mbgl/gl/gl_values.hpp +++ b/include/mbgl/gl/gl_values.hpp @@ -240,6 +240,19 @@ struct LineWidth { } }; +struct ActiveTexture { + using Type = GLint; + static const Type Default; + inline static void Set(const Type& value) { + MBGL_CHECK_ERROR(glActiveTexture(value)); + } + inline static Type Get() { + Type activeTexture; + MBGL_CHECK_ERROR(glGetIntegerv(GL_ACTIVE_TEXTURE, &activeTexture)); + return activeTexture; + } +}; + #ifndef GL_ES_VERSION_2_0 struct PixelZoom { |