summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
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);