summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/mesa/mesa-demos/0001-egl-clear-backgrounds-black.patch
blob: fb9091129102ee332c76a5e6e00e53f3dafa4bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From f5a6600ff8312a7c0f30273ab783c1d822749a73 Mon Sep 17 00:00:00 2001
From: Jiyu Yang <jiyu.yang@nxp.com>
Date: Thu, 11 Apr 2024 16:30:50 +0800
Subject: [PATCH] egl: clear backgrounds black

if 50% translucency used, the application render result can vary
depending on the format chosen, such as R10G10B10A2 or RGB24.

Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/demos/-/merge_requests/174]
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
---
 src/egl/opengles2/es2gears.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/egl/opengles2/es2gears.c b/src/egl/opengles2/es2gears.c
index 9501f61..e421a8a 100644
--- a/src/egl/opengles2/es2gears.c
+++ b/src/egl/opengles2/es2gears.c
@@ -350,7 +350,7 @@ gears_draw(void)
    GLfloat transform[16];
    mat4_identity(transform);
 
-   glClearColor(0.0, 0.0, 0.0, 0.0);
+   glClearColor(0.0, 0.0, 0.0, 1.0);
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
    /* Translate and rotate the view */