From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz2Dm-0001Ex-Jv for qemu-devel@nongnu.org; Thu, 11 Dec 2014 06:47:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xz2Dg-0003ti-Bx for qemu-devel@nongnu.org; Thu, 11 Dec 2014 06:47:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz2Dg-0003tc-3Y for qemu-devel@nongnu.org; Thu, 11 Dec 2014 06:47:44 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBBBle1k010698 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 11 Dec 2014 06:47:43 -0500 From: Gerd Hoffmann Date: Thu, 11 Dec 2014 12:05:53 +0100 Message-Id: <1418295956-22479-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [RfC PATCH 0/3] sdl2: add opengl rendering support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Hi, This series add support for screen rendering using opengl. This only blits classic DisplaySurfaces to the screen using opengl, it does not (yet) enable gfx emulation use opengl for rendering. It depends on the "sdl2: fixes, cleanups and opengl preparation" series just posted. The big question mark (and the reason this is RfC) is how we are going to enable/disable opengl at runtime. The options I see are: (1) make that a ui option, i.e. '-display sdl,opengl={on,off}'. (2) make that a global option, i.e. -opengl={on,off} I'd tend to go for (2). First, because we have a initialization order issue once gfx emulation starts using opengl: ui code is initialized after device code (and this can't be changed easily because devices need register displays before we init the ui). Therefore with (1) the device emulation doesn't know at init time time whenever opengl is available or not. Second for the long term there will be 3d support in a number of UIs: I expect sdl2, gtk, egl (using render nodes, for headless) and spice. Having a global switch for them all looks easier. Comments? Other suggestions? cheers, Gerd Gerd Hoffmann (3): configure: opengl overhaul sdl2: add support for display rendering using opengl. sdl2: move SDL_* includes to sdl2.h configure | 39 +++++------ default-configs/lm32-softmmu.mak | 2 +- hw/display/Makefile.objs | 2 +- hw/lm32/milkymist-hw.h | 4 +- include/ui/sdl2.h | 17 +++++ ui/Makefile.objs | 4 ++ ui/sdl2-2d.c | 12 ++-- ui/sdl2-gl.c | 136 +++++++++++++++++++++++++++++++++++++++ ui/sdl2-input.c | 6 -- ui/sdl2.c | 56 ++++++++++++---- 10 files changed, 227 insertions(+), 51 deletions(-) create mode 100644 ui/sdl2-gl.c -- 1.8.3.1