|
From: | Max Reitz |
Subject: | Re: [Qemu-devel] [PATCH v2 4/5] gtk: add opengl support, using egl |
Date: | Sat, 23 May 2015 19:44:04 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 20.05.2015 17:19, Gerd Hoffmann wrote:
This adds opengl rendering support to the gtk ui, using egl. It's off by default for now, use 'qemu -display gtk,gl=on' to play with this. Note that gtk got native opengl support with release 3.16. There most likely will be a separate implementation for 3.16+, using the native gtk opengl support. This patch covers older versions (and for the time being 3.16 too, hopefully without rendering quirks). Signed-off-by: Gerd Hoffmann <address@hidden> --- include/ui/console.h | 2 +- include/ui/gtk.h | 23 +++++++++ ui/Makefile.objs | 3 ++ ui/gtk-egl.c | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++ ui/gtk.c | 77 ++++++++++++++++++++++------ vl.c | 11 +++- 6 files changed, 240 insertions(+), 17 deletions(-) create mode 100644 ui/gtk-egl.c
I do see the quandary with gtk 3.14 and 3.15 (gtk_widget_set_double_buffered() is deprecated, but we need it), but the problem is, with this patch, you simply cannot compile qemu on a gtk 3.14+ system with --with-gtkabi=3.0 and without --disable-opengl, which I don't think is right.
So at least the commit message is wrong, this patch does not cover 3.16. It would without -Werror (or with -Wno-deprecated-declarations), but that's enabled by default.
Once the native OpenGL support introduced by 3.16 is used, at least that'll be covered, but we'll still have to deal with 3.14 and 3.15. I think the right thing to do is to make configure disable OpenGL support if gtk 3.14+ is to be used (in the future, that would be 3.14/3.15 only). That, or pass -Wno-deprecated-declarations for compiling ui/gtk.c, but that seems very ugly to me.
Not planning to have OpenGL support for 3.14/3.15 I think is fine, but we have to make sure that OpenGL support cannot be silently enabled by configure and then break compilation of qemu.
Max
[Prev in Thread] | Current Thread | [Next in Thread] |