update error reporting function

This commit is contained in:
Konstantin Käfer
2014-12-10 13:21:08 +01:00
parent 127600ef8c
commit 93d56294cf
38 changed files with 374 additions and 374 deletions

View File

@@ -18,7 +18,7 @@ void Painter::renderTileDebug(const Tile& tile) {
void Painter::renderDebugText(DebugBucket& bucket, const mat4 &matrix) {
gl::group group("debug text");
CHECK_ERROR(glDisable(GL_DEPTH_TEST));
MBGL_CHECK_ERROR(glDisable(GL_DEPTH_TEST));
useProgram(plainShader->program);
plainShader->u_matrix = matrix;
@@ -30,7 +30,7 @@ void Painter::renderDebugText(DebugBucket& bucket, const mat4 &matrix) {
#ifndef GL_ES_VERSION_2_0
// Draw line "end caps"
CHECK_ERROR(glPointSize(2));
MBGL_CHECK_ERROR(glPointSize(2));
bucket.drawPoints(*plainShader);
#endif
@@ -39,7 +39,7 @@ void Painter::renderDebugText(DebugBucket& bucket, const mat4 &matrix) {
lineWidth(2.0f * state.getPixelRatio());
bucket.drawLines(*plainShader);
CHECK_ERROR(glEnable(GL_DEPTH_TEST));
MBGL_CHECK_ERROR(glEnable(GL_DEPTH_TEST));
}
void Painter::renderDebugFrame(const mat4 &matrix) {
@@ -48,7 +48,7 @@ void Painter::renderDebugFrame(const mat4 &matrix) {
// Disable depth test and don't count this towards the depth buffer,
// but *don't* disable stencil test, as we want to clip the red tile border
// to the tile viewport.
CHECK_ERROR(glDisable(GL_DEPTH_TEST));
MBGL_CHECK_ERROR(glDisable(GL_DEPTH_TEST));
useProgram(plainShader->program);
plainShader->u_matrix = matrix;
@@ -57,9 +57,9 @@ void Painter::renderDebugFrame(const mat4 &matrix) {
tileBorderArray.bind(*plainShader, tileBorderBuffer, BUFFER_OFFSET(0));
plainShader->u_color = {{ 1.0f, 0.0f, 0.0f, 1.0f }};
lineWidth(4.0f * state.getPixelRatio());
CHECK_ERROR(glDrawArrays(GL_LINE_STRIP, 0, (GLsizei)tileBorderBuffer.index()));
MBGL_CHECK_ERROR(glDrawArrays(GL_LINE_STRIP, 0, (GLsizei)tileBorderBuffer.index()));
CHECK_ERROR(glEnable(GL_DEPTH_TEST));
MBGL_CHECK_ERROR(glEnable(GL_DEPTH_TEST));
}
void Painter::renderDebugText(const std::vector<std::string> &strings) {
@@ -69,8 +69,8 @@ void Painter::renderDebugText(const std::vector<std::string> &strings) {
gl::group group("debug text");
CHECK_ERROR(glDisable(GL_DEPTH_TEST));
CHECK_ERROR(glStencilFunc(GL_ALWAYS, 0xFF, 0xFF));
MBGL_CHECK_ERROR(glDisable(GL_DEPTH_TEST));
MBGL_CHECK_ERROR(glStencilFunc(GL_ALWAYS, 0xFF, 0xFF));
useProgram(plainShader->program);
plainShader->u_matrix = nativeMatrix;
@@ -88,15 +88,15 @@ void Painter::renderDebugText(const std::vector<std::string> &strings) {
debugFontArray.bind(*plainShader, debugFontBuffer, BUFFER_OFFSET(0));
plainShader->u_color = {{ 1.0f, 1.0f, 1.0f, 1.0f }};
lineWidth(4.0f * state.getPixelRatio());
CHECK_ERROR(glDrawArrays(GL_LINES, 0, (GLsizei)debugFontBuffer.index()));
MBGL_CHECK_ERROR(glDrawArrays(GL_LINES, 0, (GLsizei)debugFontBuffer.index()));
#ifndef GL_ES_VERSION_2_0
CHECK_ERROR(glPointSize(2));
CHECK_ERROR(glDrawArrays(GL_POINTS, 0, (GLsizei)debugFontBuffer.index()));
MBGL_CHECK_ERROR(glPointSize(2));
MBGL_CHECK_ERROR(glDrawArrays(GL_POINTS, 0, (GLsizei)debugFontBuffer.index()));
#endif
plainShader->u_color = {{ 0.0f, 0.0f, 0.0f, 1.0f }};
lineWidth(2.0f * state.getPixelRatio());
CHECK_ERROR(glDrawArrays(GL_LINES, 0, (GLsizei)debugFontBuffer.index()));
MBGL_CHECK_ERROR(glDrawArrays(GL_LINES, 0, (GLsizei)debugFontBuffer.index()));
}
CHECK_ERROR(glEnable(GL_DEPTH_TEST));
MBGL_CHECK_ERROR(glEnable(GL_DEPTH_TEST));
}