aboutsummaryrefslogtreecommitdiff
path: root/include/ui/sdl2.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2021-10-09 23:48:46 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2021-12-21 10:50:21 +0400
commit5e79d516e8ac818d2a90aae9f787775055434ee9 (patch)
tree572cadfe13cb13f683b0be625929427dbca469e6 /include/ui/sdl2.h
parent7cc712e9862ffdbe4161dbdf3bbf41bcbe547472 (diff)
downloadqemu-5e79d516e8ac818d2a90aae9f787775055434ee9.zip
qemu-5e79d516e8ac818d2a90aae9f787775055434ee9.tar.gz
qemu-5e79d516e8ac818d2a90aae9f787775055434ee9.tar.bz2
ui: split the GL context in a different object
This will allow to have one GL context but a variable number of listeners. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include/ui/sdl2.h')
-rw-r--r--include/ui/sdl2.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/ui/sdl2.h b/include/ui/sdl2.h
index f85c117..71bcf7e 100644
--- a/include/ui/sdl2.h
+++ b/include/ui/sdl2.h
@@ -16,6 +16,7 @@
#endif
struct sdl2_console {
+ DisplayGLCtx dgc;
DisplayChangeListener dcl;
DisplaySurface *surface;
DisplayOptions *opts;
@@ -65,10 +66,10 @@ void sdl2_gl_switch(DisplayChangeListener *dcl,
void sdl2_gl_refresh(DisplayChangeListener *dcl);
void sdl2_gl_redraw(struct sdl2_console *scon);
-QEMUGLContext sdl2_gl_create_context(DisplayChangeListener *dcl,
+QEMUGLContext sdl2_gl_create_context(DisplayGLCtx *dgc,
QEMUGLParams *params);
-void sdl2_gl_destroy_context(DisplayChangeListener *dcl, QEMUGLContext ctx);
-int sdl2_gl_make_context_current(DisplayChangeListener *dcl,
+void sdl2_gl_destroy_context(DisplayGLCtx *dgc, QEMUGLContext ctx);
+int sdl2_gl_make_context_current(DisplayGLCtx *dgc,
QEMUGLContext ctx);
void sdl2_gl_scanout_disable(DisplayChangeListener *dcl);