Color class (#5361)

* Color class

* Switch to list initialization
This commit is contained in:
Young Hahn
2016-06-15 11:38:22 -04:00
committed by GitHub
parent fe64238b4c
commit 24b66bc8cd
40 changed files with 105 additions and 62 deletions

View File

@@ -8,6 +8,7 @@
#include <mbgl/gl/gl.hpp>
#include <mbgl/gl/gl_values.hpp>
#include <mbgl/gl/gl_helper.hpp>
#include <mbgl/util/color.hpp>
using namespace mbgl;
@@ -43,7 +44,7 @@ void Painter::renderDebugText(Tile& tile, const mat4 &matrix) {
plainShader->u_matrix = matrix;
// Draw white outline
plainShader->u_color = {{ 1.0f, 1.0f, 1.0f, 1.0f }};
plainShader->u_color = { 1.0f, 1.0f, 1.0f, 1.0f };
config.lineWidth = 4.0f * frame.pixelRatio;
tile.debugBucket->drawLines(*plainShader, store);
@@ -54,7 +55,7 @@ void Painter::renderDebugText(Tile& tile, const mat4 &matrix) {
#endif
// Draw black text.
plainShader->u_color = {{ 0.0f, 0.0f, 0.0f, 1.0f }};
plainShader->u_color = { 0.0f, 0.0f, 0.0f, 1.0f };
config.lineWidth = 2.0f * frame.pixelRatio;
tile.debugBucket->drawLines(*plainShader, store);
@@ -77,7 +78,7 @@ void Painter::renderDebugFrame(const mat4 &matrix) {
// draw tile outline
tileBorderArray.bind(*plainShader, tileBorderBuffer, BUFFER_OFFSET_0, store);
plainShader->u_color = {{ 1.0f, 0.0f, 0.0f, 1.0f }};
plainShader->u_color = { 1.0f, 0.0f, 0.0f, 1.0f };
config.lineWidth = 4.0f * frame.pixelRatio;
MBGL_CHECK_ERROR(glDrawArrays(GL_LINE_STRIP, 0, (GLsizei)tileBorderBuffer.index()));
}