mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
Add gles support to egl-helpers, wire up in egl-headless and gtk.
Add support for OpenGL ES to egl-helpers. Wire up the new option for egl-headless and gtk UIs. egl-headless actually works fine. gtk hits a not-yet implemented code path in libEGL when trying to use gles mode: libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering. (This is mesa 17.2.3). Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Message-id: 20180618112141.23398-1-kraxel@redhat.com
This commit is contained in:
parent
595123df1d
commit
54d208ffda
8 changed files with 61 additions and 31 deletions
|
@ -6,15 +6,22 @@ QEMUGLContext qemu_egl_create_context(DisplayChangeListener *dcl,
|
|||
QEMUGLParams *params)
|
||||
{
|
||||
EGLContext ctx;
|
||||
EGLint ctx_att[] = {
|
||||
EGLint ctx_att_core[] = {
|
||||
EGL_CONTEXT_OPENGL_PROFILE_MASK, EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT,
|
||||
EGL_CONTEXT_CLIENT_VERSION, params->major_ver,
|
||||
EGL_CONTEXT_MINOR_VERSION_KHR, params->minor_ver,
|
||||
EGL_NONE
|
||||
};
|
||||
EGLint ctx_att_gles[] = {
|
||||
EGL_CONTEXT_CLIENT_VERSION, params->major_ver,
|
||||
EGL_CONTEXT_MINOR_VERSION_KHR, params->minor_ver,
|
||||
EGL_NONE
|
||||
};
|
||||
bool gles = (qemu_egl_mode == DISPLAYGL_MODE_ES);
|
||||
|
||||
ctx = eglCreateContext(qemu_egl_display, qemu_egl_config,
|
||||
eglGetCurrentContext(), ctx_att);
|
||||
eglGetCurrentContext(),
|
||||
gles ? ctx_att_gles : ctx_att_core);
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue