From: Gregory Hainaut Date: Tue, 28 May 2013 18:52:56 +0000 (+0200) Subject: eglretrace: Fix some EGL typos. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=0ebd90a157596decd1ff3877ed8b9d7dfd0a4849;p=apitrace eglretrace: Fix some EGL typos. * Properly set the current API. Otherwise several egl function are lost (eglGetCurrentContext return NULL) * Use read enum for the read surface --- diff --git a/retrace/glretrace_egl.cpp b/retrace/glretrace_egl.cpp index 42f7b38..27c5bb8 100644 --- a/retrace/glretrace_egl.cpp +++ b/retrace/glretrace_egl.cpp @@ -138,6 +138,7 @@ static void retrace_eglDestroySurface(trace::Call &call) { static void retrace_eglBindAPI(trace::Call &call) { current_api = call.arg(0).toUInt(); + eglBindAPI(current_api); } static void retrace_eglCreateContext(trace::Call &call) { diff --git a/retrace/glws_egl_xlib.cpp b/retrace/glws_egl_xlib.cpp index 5aacdfe..0e6b823 100644 --- a/retrace/glws_egl_xlib.cpp +++ b/retrace/glws_egl_xlib.cpp @@ -160,7 +160,7 @@ public: recreate(void) { EGLContext currentContext = eglGetCurrentContext(); EGLSurface currentDrawSurface = eglGetCurrentSurface(EGL_DRAW); - EGLSurface currentReadSurface = eglGetCurrentSurface(EGL_DRAW); + EGLSurface currentReadSurface = eglGetCurrentSurface(EGL_READ); bool rebindDrawSurface = currentDrawSurface == surface; bool rebindReadSurface = currentReadSurface == surface;