diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-06-02 22:48:06 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2010-07-28 23:07:00 -0400 |
commit | b90a3e7d8b1bcd412ddbf2a4803de2756dacd436 (patch) | |
tree | d9e9721b568da63059507953b985dcf3faeed76d /src/egl/main/eglapi.c | |
parent | aa44bd9189848b91619335207b8ec3be5679f982 (diff) |
egl: EGL_KHR_surfaceless_* extensions
These extensions allow an application to make a context current by
passing EGL_NO_SURFACE for the write and read surface in the call to
eglMakeCurrent. The motivation is that applications that only want to
render to client API targets (such as OpenGL framebuffer objects)
should not need to create a throw-away EGL surface just to get a
current context.
Diffstat (limited to 'src/egl/main/eglapi.c')
-rw-r--r-- | src/egl/main/eglapi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 09271140b1..4dc8707cfb 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -379,7 +379,11 @@ eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_list, _EGLContext *context; EGLContext ret; - _EGL_CHECK_CONFIG(disp, conf, EGL_NO_CONTEXT, drv); + if (config) + _EGL_CHECK_CONFIG(disp, conf, EGL_NO_CONTEXT, drv); + else + drv = _eglCheckDisplay(disp, __FUNCTION__); + if (!share && share_list != EGL_NO_CONTEXT) RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_NO_CONTEXT); |