From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KbBpz-0004si-CH for qemu-devel@nongnu.org; Thu, 04 Sep 2008 06:13:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KbBpy-0004sV-CJ for qemu-devel@nongnu.org; Thu, 04 Sep 2008 06:13:14 -0400 Received: from [199.232.76.173] (port=34950 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KbBpy-0004sS-43 for qemu-devel@nongnu.org; Thu, 04 Sep 2008 06:13:14 -0400 Received: from smtp.ctxuk.citrix.com ([62.200.22.115]:64890 helo=SMTP.EU.CITRIX.COM) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KbBpx-0002Xb-Lh for qemu-devel@nongnu.org; Thu, 04 Sep 2008 06:13:14 -0400 Message-ID: <48BFB518.4010209@eu.citrix.com> Date: Thu, 04 Sep 2008 11:14:48 +0100 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] opengl rendering in the sdl window References: <48B81423.9050502@eu.citrix.com> <48BF4F4F.40208@codemonkey.ws> In-Reply-To: <48BF4F4F.40208@codemonkey.ws> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Anthony Liguori wrote: > This is neat, but, I'm unsure if the right way to support OpenGL is > through SDL. For instance, there were Cocoa OpenGL patches posted a bit > ago that would be largely similar. It may make more sense to have an > OpenGL front-end that has conditional code for SDL/Cocoa/X/etc. > > Then again, I've been kicking around the idea of doing a GTK front-end. > An obvious thing to do here would be a glext based OpenGL version (as we > do in gtk-vnc). I don't think GTK support would add much to what qemu already has (aside from more dependencies :). > I think we need to have some discussion about what the long term > front-end should be for QEMU. Otherwise, we're going to end up with a > proliferation of front-ends. Personally, I'd rather move from SDL to > GTK so that we can build a proper user interface. > While decoupling the opengl code from the sdl code seems a good idea, in practice opengl is only for rendering and the sdl code handles so much more than that. Opengl depends heavily on SDL for everything else, so separating the two of them may not be straightforward. If you really want to go this route, probably the simplest way is to treat opengl as a separate drop in reandering replacement for sdl (or whatever other future frontend). Opengl would substitute only few critical rendering related functions (sdl_resize_shared, sdl_colourdepth, sdl_update, sdl_setdata).