summaryrefslogtreecommitdiffstats
path: root/ui/sdl2-gl.c
diff options
context:
space:
mode:
authorMarc-André Lureau2021-10-09 21:48:46 +0200
committerMarc-André Lureau2021-12-21 07:50:21 +0100
commit5e79d516e8ac818d2a90aae9f787775055434ee9 (patch)
tree572cadfe13cb13f683b0be625929427dbca469e6 /ui/sdl2-gl.c
parentui: dispatch GL events to all listeners (diff)
downloadqemu-5e79d516e8ac818d2a90aae9f787775055434ee9.tar.gz
qemu-5e79d516e8ac818d2a90aae9f787775055434ee9.tar.xz
qemu-5e79d516e8ac818d2a90aae9f787775055434ee9.zip
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 'ui/sdl2-gl.c')
-rw-r--r--ui/sdl2-gl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/sdl2-gl.c b/ui/sdl2-gl.c
index 5b950fbbea..39cab8cde7 100644
--- a/ui/sdl2-gl.c
+++ b/ui/sdl2-gl.c
@@ -132,10 +132,10 @@ void sdl2_gl_redraw(struct sdl2_console *scon)
}
}
-QEMUGLContext sdl2_gl_create_context(DisplayChangeListener *dcl,
+QEMUGLContext sdl2_gl_create_context(DisplayGLCtx *dgc,
QEMUGLParams *params)
{
- struct sdl2_console *scon = container_of(dcl, struct sdl2_console, dcl);
+ struct sdl2_console *scon = container_of(dgc, struct sdl2_console, dgc);
SDL_GLContext ctx;
assert(scon->opengl);
@@ -167,17 +167,17 @@ QEMUGLContext sdl2_gl_create_context(DisplayChangeListener *dcl,
return (QEMUGLContext)ctx;
}
-void sdl2_gl_destroy_context(DisplayChangeListener *dcl, QEMUGLContext ctx)
+void sdl2_gl_destroy_context(DisplayGLCtx *dgc, QEMUGLContext ctx)
{
SDL_GLContext sdlctx = (SDL_GLContext)ctx;
SDL_GL_DeleteContext(sdlctx);
}
-int sdl2_gl_make_context_current(DisplayChangeListener *dcl,
+int sdl2_gl_make_context_current(DisplayGLCtx *dgc,
QEMUGLContext ctx)
{
- struct sdl2_console *scon = container_of(dcl, struct sdl2_console, dcl);
+ struct sdl2_console *scon = container_of(dgc, struct sdl2_console, dgc);
SDL_GLContext sdlctx = (SDL_GLContext)ctx;
assert(scon->opengl);