From a5ecff0893652bde81d2af6ee431f9c0e81b72ee Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 3 May 2020 02:59:00 +1000 Subject: [PATCH] Qt: Set clear alpha to zero for OpenGL display Fixes transparent windows in Wayland. --- src/duckstation-qt/openglhostdisplay.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/duckstation-qt/openglhostdisplay.cpp b/src/duckstation-qt/openglhostdisplay.cpp index a6b119f99..7dcc47f31 100644 --- a/src/duckstation-qt/openglhostdisplay.cpp +++ b/src/duckstation-qt/openglhostdisplay.cpp @@ -444,7 +444,7 @@ out vec4 o_col0; void main() { - o_col0 = texture(samp0, v_tex0); + o_col0 = vec4(texture(samp0, v_tex0).rgb, 1.0); } )"; @@ -500,7 +500,7 @@ void OpenGLHostDisplay::Render() { glDisable(GL_SCISSOR_TEST); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); renderDisplay();