summaryrefslogtreecommitdiff
path: root/platform/glfw
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-03-22 14:56:43 +0100
committerKonstantin Käfer <mail@kkaefer.com>2017-03-28 13:53:19 +0200
commitf70f604e5b99062a24764716ccdeda64c36320be (patch)
treedbdb1399eb0e23abb66fdb0496cebc70154945ee /platform/glfw
parenta84aa453a9124867cb285f012abd97077ab2a019 (diff)
downloadqtlocation-mapboxgl-f70f604e5b99062a24764716ccdeda64c36320be.tar.gz
[core] Privatize gl/gl.hpp
Diffstat (limited to 'platform/glfw')
-rw-r--r--platform/glfw/glfw_view.cpp20
-rw-r--r--platform/glfw/glfw_view.hpp1
2 files changed, 10 insertions, 11 deletions
diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp
index e833478795..498b021bff 100644
--- a/platform/glfw/glfw_view.cpp
+++ b/platform/glfw/glfw_view.cpp
@@ -559,9 +559,9 @@ void showDebugImage(std::string name, const char *data, size_t width, size_t hei
glfwGetFramebufferSize(debugWindow, &fbWidth, &fbHeight);
float scale = static_cast<float>(fbWidth) / static_cast<float>(width);
- MBGL_CHECK_ERROR(glPixelZoom(scale, -scale));
- MBGL_CHECK_ERROR(glRasterPos2f(-1.0f, 1.0f));
- MBGL_CHECK_ERROR(glDrawPixels(width, height, GL_LUMINANCE, GL_UNSIGNED_BYTE, data));
+ glPixelZoom(scale, -scale);
+ glRasterPos2f(-1.0f, 1.0f);
+ glDrawPixels(width, height, GL_LUMINANCE, GL_UNSIGNED_BYTE, data);
glfwSwapBuffers(debugWindow);
@@ -591,13 +591,13 @@ void showColorDebugImage(std::string name, const char *data, size_t logicalWidth
float xScale = static_cast<float>(fbWidth) / static_cast<float>(width);
float yScale = static_cast<float>(fbHeight) / static_cast<float>(height);
- MBGL_CHECK_ERROR(glClearColor(0.8, 0.8, 0.8, 1));
- MBGL_CHECK_ERROR(glClear(GL_COLOR_BUFFER_BIT));
- MBGL_CHECK_ERROR(glEnable(GL_BLEND));
- MBGL_CHECK_ERROR(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
- MBGL_CHECK_ERROR(glPixelZoom(xScale, -yScale));
- MBGL_CHECK_ERROR(glRasterPos2f(-1.0f, 1.0f));
- MBGL_CHECK_ERROR(glDrawPixels(width, height, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, data));
+ glClearColor(0.8, 0.8, 0.8, 1);
+ glClear(GL_COLOR_BUFFER_BIT);
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glPixelZoom(xScale, -yScale);
+ glRasterPos2f(-1.0f, 1.0f);
+ glDrawPixels(width, height, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, data);
glfwSwapBuffers(debugWindow);
diff --git a/platform/glfw/glfw_view.hpp b/platform/glfw/glfw_view.hpp
index 1cadae2e0f..bc50eba819 100644
--- a/platform/glfw/glfw_view.hpp
+++ b/platform/glfw/glfw_view.hpp
@@ -1,6 +1,5 @@
#pragma once
-#include <mbgl/gl/gl.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/map/view.hpp>
#include <mbgl/map/backend.hpp>