summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-05-21 18:34:41 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-05-21 18:34:41 +0200
commit53a6992728ec2f200b67123dd212b16e5e341a80 (patch)
treebb8e9571318f2a76fb9cddd91f12d125121eed3e /common
parent16a79b42ca6c9aa6d631d4e2226aa5f9798d5955 (diff)
downloadqtlocation-mapboxgl-53a6992728ec2f200b67123dd212b16e5e341a80.tar.gz
fix alpha blending + add depth/stencil buffers
Diffstat (limited to 'common')
-rw-r--r--common/glfw_view.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/glfw_view.cpp b/common/glfw_view.cpp
index dcfaf6591e..9590cc5e78 100644
--- a/common/glfw_view.cpp
+++ b/common/glfw_view.cpp
@@ -261,6 +261,10 @@ void show_color_debug_image(std::string name, const char *data, size_t logical_w
float x_scale = (float)fb_width / (float)width;
float y_scale = (float)fb_height / (float)height;
+ glClear(GL_COLOR_BUFFER_BIT);
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
glPixelZoom(x_scale, -y_scale);
glRasterPos2f(-1.0f, 1.0f);
glDrawPixels(width, height, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, data);