diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-12-10 11:59:30 -0800 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-12-10 11:59:51 -0800 |
commit | 655b777635439d64f46930b20e6436c2f36364dc (patch) | |
tree | afea63d31c098338d530ed7e8c079524b8c59913 /src/mbgl/shader/outline_shader.cpp | |
parent | b7a238f425737a222304aff241b927b16c693fc7 (diff) | |
download | qtlocation-mapboxgl-655b777635439d64f46930b20e6436c2f36364dc.tar.gz |
[core] don't rebuild shaders unless they change
Diffstat (limited to 'src/mbgl/shader/outline_shader.cpp')
-rw-r--r-- | src/mbgl/shader/outline_shader.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mbgl/shader/outline_shader.cpp b/src/mbgl/shader/outline_shader.cpp index 74453468bf..9cda1a1108 100644 --- a/src/mbgl/shader/outline_shader.cpp +++ b/src/mbgl/shader/outline_shader.cpp @@ -1,5 +1,6 @@ #include <mbgl/shader/outline_shader.hpp> -#include <mbgl/shader/shaders.hpp> +#include <mbgl/shader/outline.vertex.hpp> +#include <mbgl/shader/outline.fragment.hpp> #include <mbgl/platform/gl.hpp> #include <cstdio> @@ -7,14 +8,10 @@ using namespace mbgl; OutlineShader::OutlineShader() - : Shader( - "outline", - shaders[OUTLINE_SHADER].vertex, - shaders[OUTLINE_SHADER].fragment - ) { + : Shader("outline", shaders::outline::vertex, shaders::outline::fragment) { } -void OutlineShader::bind(GLbyte *offset) { +void OutlineShader::bind(GLbyte* offset) { MBGL_CHECK_ERROR(glEnableVertexAttribArray(a_pos)); MBGL_CHECK_ERROR(glVertexAttribPointer(a_pos, 2, GL_SHORT, false, 0, offset)); } |