From: Max Reitz <mreitz@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 4/4] gtk: add opengl support, using egl
Date: Wed, 20 May 2015 15:29:05 +0200 [thread overview]
Message-ID: <555C8C21.90205@redhat.com> (raw)
In-Reply-To: <1432045761-15543-5-git-send-email-kraxel@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2634 bytes --]
On 19.05.2015 16:29, 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 <kraxel@redhat.com>
> ---
> 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 can't give any R-b, because that would require really digging into
Gtk... The code is pretty similar to the SDL code, though (not by chance
I guess), so it looks fine to me. If it would compile, that is, see below.
(It does work with Gtk 2, though)
((at least on my laptop with mesa; on my desktop with fglrx, creating
the shader fails, which may or may not have to do something with "libEGL
warning: DRI2: failed to authenticate" (which is probably in turn my own
fault for using a proprietary driver))) Konsole output
[snip]
> diff --git a/ui/gtk.c b/ui/gtk.c
> index c58028f..bf66014 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
[snip]
> @@ -1713,7 +1737,16 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc,
> gtk_notebook_append_page(GTK_NOTEBOOK(s->notebook),
> vc->tab_item, gtk_label_new(vc->label));
>
> - vc->gfx.dcl.ops = &dcl_ops;
> +#if defined(CONFIG_OPENGL)
> + if (display_opengl) {
> + gtk_widget_set_double_buffered(vc->gfx.drawing_area, FALSE);
gcc said:
> Konsole output qemu/ui/gtk.c:1742:9: Fehler:
»gtk_widget_set_double_buffered« is deprecated (declared at
/usr/include/gtk-3.0/gtk/gtkwidget.h:896) [-Werror=deprecated-declarations]
(yes, the mix of German and English is gcc's doing)
But then again it didn't compile before, either: qemu/ui/gtk.c:1927:5:
Fehler: »gdk_cursor_new« is deprecated (declared at
/usr/include/gtk-3.0/gdk/gdkcursor.h:223) [-Werror=deprecated-declarations]
But that function was deprecated in 3.16,
gtk_widget_set_double_buffered() was deprecated in 3.14 already (as far
as I can see from the header file alone).
Max
[-- Attachment #2: Type: text/html, Size: 3794 bytes --]
next prev parent reply other threads:[~2015-05-20 13:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-19 14:29 [Qemu-devel] [PATCH 0/4] gtk: add opengl support Gerd Hoffmann
2015-05-19 14:29 ` [Qemu-devel] [PATCH 1/4] ui: use libexpoxy Gerd Hoffmann
2015-05-20 10:47 ` Max Reitz
2015-05-19 14:29 ` [Qemu-devel] [PATCH 2/4] ui: shader.h protect against double inclusion Gerd Hoffmann
2015-05-20 10:58 ` Max Reitz
2015-05-19 14:29 ` [Qemu-devel] [PATCH 3/4] ui: add egl-helpers Gerd Hoffmann
2015-05-20 12:15 ` Max Reitz
2015-05-20 14:46 ` Gerd Hoffmann
2015-05-19 14:29 ` [Qemu-devel] [PATCH 4/4] gtk: add opengl support, using egl Gerd Hoffmann
2015-05-20 13:29 ` Max Reitz [this message]
2015-05-20 14:14 ` Gerd Hoffmann
2015-05-20 14:16 ` Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=555C8C21.90205@redhat.com \
--to=mreitz@redhat.com \
--cc=kraxel@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).