summaryrefslogtreecommitdiff
path: root/src/egl/main/eglcurrent.c
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-01-26 16:52:14 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-01-26 18:46:05 +0800
commit6f6f3e4227855c87a78a717bce7374a7d64172ce (patch)
tree9d25514e45b13f86aaf75b8ef7bc448fc909e8a7 /src/egl/main/eglcurrent.c
parentf65ed0a3097d91289ced44d53786506333122b55 (diff)
egl: Add _eglGetAPIContext.
It will return the currently bound context of the given API.
Diffstat (limited to 'src/egl/main/eglcurrent.c')
-rw-r--r--src/egl/main/eglcurrent.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/egl/main/eglcurrent.c b/src/egl/main/eglcurrent.c
index f91631240f..b3be2305fd 100644
--- a/src/egl/main/eglcurrent.c
+++ b/src/egl/main/eglcurrent.c
@@ -227,7 +227,18 @@ _eglIsCurrentThreadDummy(void)
/**
- * Return the currently bound context, or NULL.
+ * Return the currently bound context of the given API, or NULL.
+ */
+PUBLIC _EGLContext *
+_eglGetAPIContext(EGLenum api)
+{
+ _EGLThreadInfo *t = _eglGetCurrentThread();
+ return t->CurrentContexts[_eglConvertApiToIndex(api)];
+}
+
+
+/**
+ * Return the currently bound context of the current API, or NULL.
*/
_EGLContext *
_eglGetCurrentContext(void)