From b90a3e7d8b1bcd412ddbf2a4803de2756dacd436 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Wed, 2 Jun 2010 22:48:06 -0400 Subject: 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. --- src/egl/main/eglapi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/egl/main/eglapi.c') 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); -- cgit v1.2.3