diff options
author | Brian Paul <[email protected]> | 2008-06-19 21:19:33 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-06-19 21:19:33 -0600 |
commit | 9f6a4e2a65ff872bc27e7081df7d6205393a1180 (patch) | |
tree | 69dd2e6153c8f36b25e37e190fdf163c429942f7 /src | |
parent | 78d05bcc27ba02282711174a8b3aa5f1ebea9151 (diff) |
egl: fix assorted context-related bugs
Move memset() to proper place.
Added EGL_CONTEXT_CLIENT_VERSION query.
Fix bad return EGL_FALSE -> EGL_TRUE.
Diffstat (limited to 'src')
-rw-r--r-- | src/egl/main/eglcontext.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c index 15847ef2da6..461679db090 100644 --- a/src/egl/main/eglcontext.c +++ b/src/egl/main/eglcontext.c @@ -33,6 +33,8 @@ _eglInitContext(_EGLDriver *drv, EGLDisplay dpy, _EGLContext *ctx, return EGL_FALSE; } + memset(ctx, 0, sizeof(_EGLContext)); + ctx->ClientVersion = 1; /* the default, per EGL spec */ for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) { @@ -47,7 +49,6 @@ _eglInitContext(_EGLDriver *drv, EGLDisplay dpy, _EGLContext *ctx, } } - memset(ctx, 0, sizeof(_EGLContext)); ctx->Display = display; ctx->Config = conf; ctx->DrawSurface = EGL_NO_SURFACE; @@ -188,8 +189,11 @@ _eglQueryContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext ctx, #ifdef EGL_VERSION_1_2 case EGL_CONTEXT_CLIENT_TYPE: *value = c->ClientAPI; - return EGL_FALSE; + return EGL_TRUE; #endif /* EGL_VERSION_1_2 */ + case EGL_CONTEXT_CLIENT_VERSION: + *value = c->ClientVersion; + return EGL_TRUE; default: _eglError(EGL_BAD_ATTRIBUTE, "eglQueryContext"); return EGL_FALSE; |