mirror of
https://github.com/brl/mutter.git
synced 2025-01-27 11:59:12 +00:00
egl: support creating OpenGL contexts
Right before we create the EGL context, we check if we were built with OpenGL or OpenGLES support and it was OpenGL then we call eglBindAPI (EGL_OPENGL_API); This also explicitly requests a EGL_RENDERABLE_TYPE supporting the EGL_OPENGL_BIT. This will let us add a new ./configure flavour that combines OpenGL and EGL instead of OpenGL and GLX.
This commit is contained in:
parent
a84ecf3919
commit
cd82b704e9
@ -157,7 +157,9 @@ clutter_backend_egl_create_context (ClutterBackend *backend,
|
||||
|
||||
EGL_BUFFER_SIZE, EGL_DONT_CARE,
|
||||
|
||||
#if defined (HAVE_COGL_GLES2)
|
||||
#if defined (HAVE_COGL_GL)
|
||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
|
||||
#elif defined (HAVE_COGL_GLES2)
|
||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
|
||||
#else
|
||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES_BIT,
|
||||
@ -206,6 +208,10 @@ retry:
|
||||
goto fail;
|
||||
}
|
||||
|
||||
#ifdef HAVE_COGL_GL
|
||||
eglBindAPI (EGL_OPENGL_API);
|
||||
#endif
|
||||
|
||||
if (backend_egl->egl_context == EGL_NO_CONTEXT)
|
||||
{
|
||||
#ifdef HAVE_COGL_GLES2
|
||||
|
Loading…
x
Reference in New Issue
Block a user