diff options
author | Hoe Hao Cheng <haochengho12907@gmail.com> | 2023-03-27 21:14:50 +0800 |
---|---|---|
committer | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2023-04-04 19:56:58 +0000 |
commit | cc6ec4130e6c69e0b9a2da5e5ebf64efac945f02 (patch) | |
tree | 4cf848d78cbcf3062519a8a3bcda646412304998 | |
parent | 392abdc986d8ff34ee7b52a4da54429a9cbaa45a (diff) | |
download | mesa-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.c | 1 | ||||
-rw-r--r-- | src/egl/opengles1/drawtex.c | 4 | ||||
-rw-r--r-- | src/egl/opengles1/tri.c | 3 |
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 |