summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoe Hao Cheng <haochengho12907@gmail.com>2023-03-27 21:14:50 +0800
committerErik Faye-Lund <erik.faye-lund@collabora.com>2023-04-04 19:56:58 +0000
commitcc6ec4130e6c69e0b9a2da5e5ebf64efac945f02 (patch)
tree4cf848d78cbcf3062519a8a3bcda646412304998
parent392abdc986d8ff34ee7b52a4da54429a9cbaa45a (diff)
downloadmesa-demos-cc6ec4130e6c69e0b9a2da5e5ebf64efac945f02.tar.gz
egl: trigger redraw on keypress and window resizing on demos
Otherwise on those demos the graphics will never update on Wayland. The X11 WSI forces a redraw on each keypress so this went unnoticed for a long time. Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
-rw-r--r--src/egl/opengl/egltri.c1
-rw-r--r--src/egl/opengles1/drawtex.c4
-rw-r--r--src/egl/opengles1/tri.c3
3 files changed, 8 insertions, 0 deletions
diff --git a/src/egl/opengl/egltri.c b/src/egl/opengl/egltri.c
index d378f521..77e89c77 100644
--- a/src/egl/opengl/egltri.c
+++ b/src/egl/opengl/egltri.c
@@ -118,6 +118,7 @@ special_key(int special)
default:
break;
}
+ eglutPostRedisplay();
}
int
diff --git a/src/egl/opengles1/drawtex.c b/src/egl/opengles1/drawtex.c
index 6c2d3d9f..e0081bfd 100644
--- a/src/egl/opengles1/drawtex.c
+++ b/src/egl/opengles1/drawtex.c
@@ -76,6 +76,8 @@ reshape(int width, int height)
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0, 0.0, -15.0);
+
+ eglutPostRedisplay();
}
@@ -199,6 +201,7 @@ key(unsigned char key)
default:
break;
}
+ eglutPostRedisplay();
}
static void
@@ -220,6 +223,7 @@ special_key(int key)
default:
break;
}
+ eglutPostRedisplay();
}
int
diff --git a/src/egl/opengles1/tri.c b/src/egl/opengles1/tri.c
index a5e7b9ce..531e3e69 100644
--- a/src/egl/opengles1/tri.c
+++ b/src/egl/opengles1/tri.c
@@ -131,6 +131,8 @@ reshape(int width, int height)
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0, 0.0, -10.0);
+
+ eglutPostRedisplay();
}
@@ -187,6 +189,7 @@ special_key(int special)
default:
break;
}
+ eglutPostRedisplay();
}
int