aboutsummaryrefslogtreecommitdiff
path: root/ui/sdl2-2d.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-11-11 16:54:45 +0100
committerGerd Hoffmann <kraxel@redhat.com>2015-05-05 10:48:26 +0200
commit0b71a5d5caa4f709d37fa1d7786dffc2c94f8414 (patch)
treedb4697889cfdac1fae3cf5a42055cb21cd08aa72 /ui/sdl2-2d.c
parent19dadfccd0124804e2790e7cb075c9df7cd3154f (diff)
sdl2: add support for display rendering using opengl.
Add new sdl2-gl.c file, with display rendering functions using opengl. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'ui/sdl2-2d.c')
-rw-r--r--ui/sdl2-2d.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/sdl2-2d.c b/ui/sdl2-2d.c
index 46ef5f7d3e..bb56747140 100644
--- a/ui/sdl2-2d.c
+++ b/ui/sdl2-2d.c
@@ -36,6 +36,8 @@ void sdl2_2d_update(DisplayChangeListener *dcl,
DisplaySurface *surf = qemu_console_surface(dcl->con);
SDL_Rect rect;
+ assert(!scon->opengl);
+
if (!surf) {
return;
}
@@ -61,6 +63,8 @@ void sdl2_2d_switch(DisplayChangeListener *dcl,
DisplaySurface *old_surface = scon->surface;
int format = 0;
+ assert(!scon->opengl);
+
scon->surface = new_surface;
if (scon->texture) {
@@ -101,12 +105,15 @@ void sdl2_2d_refresh(DisplayChangeListener *dcl)
{
struct sdl2_console *scon = container_of(dcl, struct sdl2_console, dcl);
+ assert(!scon->opengl);
graphic_hw_update(dcl->con);
sdl2_poll_events(scon);
}
void sdl2_2d_redraw(struct sdl2_console *scon)
{
+ assert(!scon->opengl);
+
if (!scon->surface) {
return;
}