egl: Add _eglGetAPIContext.

It will return the currently bound context of the given API.
This commit is contained in:
Chia-I Wu
2010-01-26 16:52:14 +08:00
parent f65ed0a309
commit 6f6f3e4227
2 changed files with 16 additions and 1 deletions
+12 -1
View File
@@ -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)
+4
View File
@@ -72,6 +72,10 @@ extern EGLBoolean
_eglIsCurrentThreadDummy(void);
PUBLIC _EGLContext *
_eglGetAPIContext(EGLenum api);
PUBLIC _EGLContext *
_eglGetCurrentContext(void);