mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
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>
This commit is contained in:
parent
7cc712e986
commit
5e79d516e8
14 changed files with 119 additions and 76 deletions
10
ui/gtk-egl.c
10
ui/gtk-egl.c
|
@ -197,14 +197,14 @@ void gd_egl_switch(DisplayChangeListener *dcl,
|
|||
}
|
||||
}
|
||||
|
||||
QEMUGLContext gd_egl_create_context(DisplayChangeListener *dcl,
|
||||
QEMUGLContext gd_egl_create_context(DisplayGLCtx *dgc,
|
||||
QEMUGLParams *params)
|
||||
{
|
||||
VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
|
||||
VirtualConsole *vc = container_of(dgc, VirtualConsole, gfx.dgc);
|
||||
|
||||
eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
|
||||
vc->gfx.esurface, vc->gfx.ectx);
|
||||
return qemu_egl_create_context(dcl, params);
|
||||
return qemu_egl_create_context(dgc, params);
|
||||
}
|
||||
|
||||
void gd_egl_scanout_disable(DisplayChangeListener *dcl)
|
||||
|
@ -360,10 +360,10 @@ void gtk_egl_init(DisplayGLMode mode)
|
|||
display_opengl = 1;
|
||||
}
|
||||
|
||||
int gd_egl_make_current(DisplayChangeListener *dcl,
|
||||
int gd_egl_make_current(DisplayGLCtx *dgc,
|
||||
QEMUGLContext ctx)
|
||||
{
|
||||
VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
|
||||
VirtualConsole *vc = container_of(dgc, VirtualConsole, gfx.dgc);
|
||||
|
||||
return eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
|
||||
vc->gfx.esurface, ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue