diff options
author | Brian Paul <[email protected]> | 2008-05-27 14:23:56 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-05-27 14:23:56 -0600 |
commit | 5f8a4f3e5e8fe78f1abe9ca6dd1131ad53d3d943 (patch) | |
tree | 818a70e50d9623dc97bdc5e3a4122c2efe0f746d /src/egl/main | |
parent | 5e7dba541298a29f175f9d077bf6f63030465d94 (diff) |
added EGL_OPENGL_API case
Diffstat (limited to 'src/egl/main')
-rw-r--r-- | src/egl/main/eglapi.c | 11 | ||||
-rw-r--r-- | src/egl/main/eglglobals.h | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index c57d29dda67..4df31cc03ff 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -511,6 +511,15 @@ eglBindAPI(EGLenum api) _EGLThreadInfo *t = _eglGetCurrentThread(); switch (api) { +#ifdef EGL_VERSION_1_4 + case EGL_OPENGL_API: + if (_eglGlobal.OpenGLAPISupported) { + t->CurrentAPI = api; + return EGL_TRUE; + } + _eglError(EGL_BAD_PARAMETER, "eglBindAPI"); + return EGL_FALSE; +#endif case EGL_OPENGL_ES_API: if (_eglGlobal.OpenGLESAPISupported) { t->CurrentAPI = api; @@ -546,7 +555,7 @@ eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLenum eglQueryAPI(void) { - /* returns one of EGL_OPENGL_ES_API or EGL_OPENVG_API */ + /* returns one of EGL_OPENGL_API, EGL_OPENGL_ES_API or EGL_OPENVG_API */ _EGLThreadInfo *t = _eglGetCurrentThread(); return t->CurrentAPI; } diff --git a/src/egl/main/eglglobals.h b/src/egl/main/eglglobals.h index 4fccd226b7a..6b858b6b089 100644 --- a/src/egl/main/eglglobals.h +++ b/src/egl/main/eglglobals.h @@ -29,6 +29,7 @@ struct _egl_global EGLScreenMESA FreeScreenHandle; /* XXX these may be temporary */ + EGLBoolean OpenGLAPISupported; EGLBoolean OpenGLESAPISupported; EGLBoolean OpenVGAPISupported; |