ioemu: SDL rendering using OpenGL

Add opengl support for rendering the guest framebuffer in the SDL
window. SDL is needed anyway to open the window and handle the
events. Opengl rendering is optional and can be turned off at both
compile time and in the vm configuration file.

Some of the benefits of using opengl are:

 - faster rendering, less CPU intensive, especially with good graphic
   cards;
 - makes the window resizing possible and hardware accelerated, thus
   very efficient and smooth;
 - allows other optimizations like sharing directly a buffer in vram
   with the guest (not yet implemented).

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
This commit is contained in:
Keir Fraser committed 2008-03-18 11:47:58 +00:00
1 parent 985bf498a5
commit 1fa1369d8a
8 files changed
+216 -14

No files matched your search

+1
View File
@@ -142,6 +142,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
'rtc_timeoffset': int,
'serial': str,
'sdl': int,
'opengl': int,
'soundhw': str,
'stdvga': int,
'usb': int,
+2 -1
View File
@@ -263,7 +263,8 @@ class ImageHandler:
elif has_sdl:
# SDL is default in QEMU.
pass
if int(vmConfig['platform'].get('opengl', 1)) != 1 :
ret.append('-disable-opengl')
else:
ret.append('-nographic')
+5 -1
View File
@@ -504,6 +504,10 @@ gopts.var('sdl', val='',
fn=set_value, default=None,
use="""Should the device model use SDL?""")
gopts.var('opengl', val='',
fn=set_value, default=None,
use="""Enable\Disable OpenGL""")
gopts.var('display', val='DISPLAY',
fn=set_value, default=None,
use="X11 display to use")
@@ -745,7 +749,7 @@ def configure_hvm(config_image, vals):
'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
'sdl', 'display', 'xauthority', 'rtc_timeoffset', 'monitor',
'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci', 'hpet',
'guest_os_type', 'hap']
'guest_os_type', 'hap', 'opengl']
for a in args:
if a in vals.__dict__ and vals.__dict__[a] is not None:
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.